Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-09-2002, 09:06 AM   PM User | #1
locust
New to the CF scene

 
Join Date: Nov 2002
Location: Cape town
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
locust is an unknown quantity at this point
reading data from a table that users clicks on

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
locust is offline   Reply With Quote
Old 11-09-2002, 02:03 PM   PM User | #2
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
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:

PHP Code:
$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

PHP Code:
$whichCell $_GET['cell']; 
mordred is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:52 AM.


Advertisement
Log in to turn off these ads.