...

View Full Version : reading data from a table that users clicks on



locust
11-09-2002, 10:06 AM
sorry i didn't ask my last question correctly


eg
eg.
foreach($CurrentRow as $field){
print "<TD><A href=Query.php> $field</A></TD>";
}

if it generates 10 records
how do i detect which hypertext the user has clicked on
and then send that value via a variable

thanks 4 your help

mordred
11-09-2002, 03:03 PM
Every link needs to be slightly different from the others to distinguish it. You can do that by passing a value through the query string. This value must be written by your code automatically, perhaps like this:



$i = 1;

foreach($CurrentRow as $field) {
print "<TD><A href=Query.php?cell=" . ($i++) . "> $field</A></TD>";
}


On Query.php, you can get at the "cell" variable through



$whichCell = $_GET['cell'];



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum