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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.