Jump to content

linking mysql


stuart7398

Recommended Posts

hi. i am learning php / mysql. i can retreive data.

my data is 10 small image links.

how do i click each individual link to go to each individual profile page?

 

while($info = mysql_fetch_array( $data ))

{

Print "<p><a href=''>".$info['col_2'] ." <img src='/imgs/bg/boats.jpg' width='73px' />".$info['submission_id'] . "</a></p>";

 

 

thanks.

Link to comment
https://forums.phpfreaks.com/topic/96279-linking-mysql/
Share on other sites

You would put in a link to your profile page along with a url variable with the submission id and then, on your profile page, it would use that ID to get and display your info from the database

 

while($info = mysql_fetch_array( $data ))
{
Print "<p><a href='profile.php?id=".$info['submission_id']."'>".$info['col_2'] ." <img src='/imgs/bg/boats.jpg' width='73px' />".$info['submission_id'] . "</p>";

 

Link to comment
https://forums.phpfreaks.com/topic/96279-linking-mysql/#findComment-493197
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.