Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Changing a variable onclick
March 1, 2005, 1:38 pm
rate this thread
Re: Changing a variable onclick
echo '<a href="', $_SERVER['PHP_SELF'],
'?foo=1&bar=2">Click here to change variables</a>';
When the script reloads, you can access the values of
foo and bar as $_GET['foo'] and $_GET['bar'], respectively.
Or, you could just save them as session variables...