Forum Moderators: coopster

Message Too Old, No Replies

link from mysql results to another page

linkinf an html page with more results from the previous page

         

togethercomms

8:16 am on Jun 24, 2009 (gmt 0)

10+ Year Member



echo
'<a href="http://'.$myrow['link'].'>'.$myrow['place'].'</a>';

I found this snippet of code on the website which i think will do what i want but i just need a little clarification.

I have got a page with MySQL results on them and what i need is to have a link that will go from a result to a template file with that same result but wiith more information on it.

Will this do it for me?

barns101

11:53 am on Jun 24, 2009 (gmt 0)

10+ Year Member



You'd need to pass some sort of MySQL record identifier in the link so that the template knows which record to display:

echo '<a href="http://example.com/template.php?id='.$myrow['id'].'>'.$myrow['place'].'</a>';

Obviously the $myrow['id'] field name could vary etc...