Rugbyfreak Posted May 31, 2009 Share Posted May 31, 2009 i first put on the page wich friends someone haves. and next to it a link to send him a message so the output is: yannick geoffrey etc... and i would like to say that whatever on wich link we click: $name=yannick or geoffrey, etc... $result = mysql_query("SELECT * FROM $user "); while ($row = mysql_fetch_array($result)) { echo $row["friends"]."<a href=\"sendmessage.php\"> send message</a>"; echo "<br/>"; } echo "<br /><hr/>"; Link to comment https://forums.phpfreaks.com/topic/160406-row/ Share on other sites More sharing options...
Ken2k7 Posted May 31, 2009 Share Posted May 31, 2009 What? ??? Be more specific. I have no idea what you need help with. Link to comment https://forums.phpfreaks.com/topic/160406-row/#findComment-846448 Share on other sites More sharing options...
Rugbyfreak Posted June 1, 2009 Author Share Posted June 1, 2009 let's pretend that the output of the "echo $row"= list of names and next to it a link will be: name1 link name2 link name3 link name4 link ... when we click on a link the name next to it should be desplayed in an other page that looks like: echo "you clicked on $name" i hope you understand now thank you for the reply Link to comment https://forums.phpfreaks.com/topic/160406-row/#findComment-846740 Share on other sites More sharing options...
lonewolf217 Posted June 1, 2009 Share Posted June 1, 2009 the basics of this are done like this <?php //page1 echo "<a href='page2.php?name=" . $row['name'] . "'>" . $row['name'] . "</a>"; //page2 $name = $_GET['name']; Link to comment https://forums.phpfreaks.com/topic/160406-row/#findComment-846806 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.