I have multiple links (e.g. 100 - 120) in my HTML page. What I really need is to send different data to another PHP page (e.g. display.php) when I click each link. I tried a pathetic approach,
<form action="display.php" method="post"> // or GET <input type="hidden" name ="data" value="Data1" /> <input type="submit" value="Link 1" /> </form>` . . . <form action="display.php" method="post"> <input type="hidden" name ="data" value="Data120" /> <input type="submit" value="Link 120" /> </form>
Is there any simple way to reduce the use of these 120 forms?
P粉9330033502024-01-10 10:44:25
You can place data directly on the href of the tag.
For example:
Click here
Then in your display.php file:
for you.