affluent980 Posted January 29, 2009 Share Posted January 29, 2009 I have a block of code that displays the contents of my table for leads that i collect. I want to be able to hyperlink the "LeadID" so that when clicked, I can a page that displays that lead's info so i can then edit it if necessary. How do i make each returned "LeadID" hyperlinked so it will go to the next page? Here is my code so far that shows the table and i want to make LeadID hyperlinked to go to my next page details.php . Please help!!! while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['LeadID'] . "</td>"; echo "<td>" . $row['CID'] . "</td>"; echo "<td>" . $row['Category'] . "</td>"; echo "<td>" . $row['Name'] . "</td>"; echo "<td>" . $row['Email'] . "</td>"; echo "<td>" . $row['Phone'] . "</td>"; echo "<td>" . $row['Date'] . "</td>"; echo "<td>" . $row['Time'] . "</td>"; echo "<td>" . $row['Keyword'] . "</td>"; echo "<td>" . $row['More'] . "</td>"; echo "<td>" . $row['Less'] . "</td>"; echo "<td>" . $row['Closed'] . "</td>"; echo "<td>" . $row['Revenue'] . "</td>"; echo "</tr>"; } Link to comment https://forums.phpfreaks.com/topic/143020-need-help-on-how-to-hyperlink-query-results-in-a-table/ Share on other sites More sharing options...
Maq Posted January 29, 2009 Share Posted January 29, 2009 This should work: echo "Lead: " . $row['LeadID'] . ""; Then on details.php you can retrieve what LeadID was clicked on by: $_GET['leadid'] Link to comment https://forums.phpfreaks.com/topic/143020-need-help-on-how-to-hyperlink-query-results-in-a-table/#findComment-749993 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.