Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Help!

  1. #1
    New Coder
    Join Date
    May 2008
    Posts
    94
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Question Help!

    hehe.


    I'm trying to make it where whatever title it is it will be a link to the right one:
    PHP Code:
    echo $row['title'] . '<a href="/magictrick.php?id=' $row['id'] . '">Go to the trick</a>'
    Thanks

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Saw that one comming, lol
    When I gave you the $row['id'] part that you missed in it, I didn't mean that it had to be $row['id']. If you still have no query string (the part that appears after the page.php? part in the url), then you have a different variable name within your database (assuming its a record fetch). Best way to determine what you need is to do a print_r($row) somewhere in your code, and that will dump an array of the values within $row and their corresponding keys. One of those keys should be the ID you want to search on, but you may need to alter your SQL SELECT call to include it in (most people tend to use SELECT *, though once you become more optimized minded you will only fetch what you need).
    Try that out. Oh, and as fumigator pointed out, please use a title for your post that is reflecting the actual problem you are having, and a description of what the problem is / what the incorrect results are. This helps us figure out what you need to do!
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •