I was wondering if someone could give me an example of how I could attach a variable to a hyperlink in PHP so that the value of the variable is carried over to the next page and used on that page. I've done it in ASP where you have your link followed by a ?variable=value then use the query string function to get it, but never done this in PHP and not sure of the syntax.
thanks.
Query String Syntax
Moderator: General Moderators
-
Mohit_Prog
- Forum Commoner
- Posts: 26
- Joined: Mon Apr 23, 2007 6:10 am
-
... and the values will be in
then.
djot
-
... and the values will be in
Code: Select all
<?php
var_dump $_GET['var1'];
var_dump $_GET['var2'];
?>djot
-
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany