so i have a form at sampleform.html which accepts user’s value [This is a number chosen from a dropdown menu. The number is the id of a ward]
This number is passed onto index.php through the GET method. Now, on index.php, the user sees details related to the number he chose (from a mysql database) and he has two links to choose from:
- Lorry routes
- Tricycle routes
I want to pass a new variable ‘route=lor’ or ‘route=tri’ through a hyperlink url and also the original ward number from sampleform.html to a new page – route.php through index.php
I tried $_SESSION on index.php, where $_SESSION[‘wardno’] accepts the $_GET[‘wno’] value from sampleform.html. But I’m not able to see any output on route.php when i call $_SESSION[‘wardno’].
How do i pass this variable from sampleform.html, through index.php and to route.php after clicking on one of the two hyperlinks on index.php??
I’m seeing no syntax errors. Will put up the code if you guys don’t understand the question.
Help is appreciated. Thanks in advance,
Kaushik
Include the names and values of whatever GET query variables you want to pass on through index.php in the
hrefattributes of the two hyperlinks.Code snippet #1