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

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.