Quick question.
How do you assign value to a variable based on which link the user clicks.
Say I have three links that point to one.php, two.php, three.php
When the user clicks on any of those links I want assign the number of that page to a variable before going to that page.
Thanks.
assigning value
Moderator: General Moderators
- gkwhitworth
- Forum Commoner
- Posts: 85
- Joined: Tue Sep 05, 2006 8:28 pm
- Location: Wasilla, Alaska
- speedy33417
- Forum Contributor
- Posts: 128
- Joined: Sun Jul 23, 2006 1:14 pm
One of the pages where I would use it is a photo gallery page. Clicking on a thumbpic would save the album_id in a variable then process the page based on that variable.
album_view.php checks if there's a value assigned to the variable. If not that means it will display the main gallery, if there's a value assigned to it then it will display that sub-gallery.
album_view.php checks if there's a value assigned to the variable. If not that means it will display the main gallery, if there's a value assigned to it then it will display that sub-gallery.
- speedy33417
- Forum Contributor
- Posts: 128
- Joined: Sun Jul 23, 2006 1:14 pm
Well, that's exactly what my problem was. I already had to have the variable assigned to some value by the time I get to the receiving page.
I'll probably just use this code.
I'll probably just use this code.
Code: Select all
<a href=\"album_view.php?page=$album\">