Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2002
    Location
    Cape town
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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']; 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •