Jump to content

how can php know which link was clicked - help


priyankabhar

Recommended Posts

Hi All,

 

I have my php to print out table for me, and each row data in the table is a link. I have done this much. Now, in the next step, I need to be able to click a link from the table and another table with some information about the link is supposed to appear at the bottom of the same page. I am not sure how I can use php to know which table row data (link) I clicked, so that the corresponding information can be echoed out on the new table below.

 

<tr>

                   

                    <td> <?php echo $movieCounter ?> </td>

                    <td> <div id="movieLink"><a href="#MovieSection"> <?php echo $movieName ?></a></div></td>

                    <td> <div id="movieLink"><a href="#"><?php echo $movieID ?> </a></div></td>

                 

                    <td> <?php echo $movieStatus ?> </td>

                </tr>

 

This is how the link is created. It is inside a for loop. So there are 5 links ( 5 movie names) that will be created. I need to be able to click on a movie name, and the corresponding informations about the movie should appear in the bottom. I am not sure how I can trace which movie name was clicked so that I could fetch its information from database?

 

Any help would be greatly appreciated.

 

Thanks a lot.

 

Priya

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.