View Full Version : Help!

05-14-2008, 08:46 PM

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

Thanks :D

05-14-2008, 09:08 PM

05-15-2008, 02:01 AM
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!