Hi guys,
At the moment, I have a search page that returns results in a table. The coding for which is:
echo "<TABLE BORDER=1>";
for ($i=0; $i<$num_rows; $i++)
{
$array=mysql_fetch_array($result);
printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</TD><TD>%s</TD></TR>", $array['firstname'], $array['email'], $array['location'], $array['age']);
}
echo "</TABLE>";
This returns my results in a neat little table.
The next step is to link the first column in each row to a details page on that particular row. I know that I need to pass the variable via the URL but I have two questions...
1) I can't seem to add a hyperlink to the first column (in this case $array['firstname']. How do I do this with the current code?
2) Once I have set the hyperlink to go to the details page, how can I be sure that the row that is clicked on will be the one that is passed to the next page? I'm thinking that it may just pass the first value returned by the original query if that makes sense.
Any help would be greatly appreciated!
Thanks