Hello and welcome to our community! Is this your first visit?
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
    Thanked 0 Times in 0 Posts

    Question Help!


    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>'

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

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 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'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


    Posting Permissions

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