odetron Posted February 11, 2007 Share Posted February 11, 2007 Lets say i have the text [1] and i whant it to change a variable when clicked on. so variable $i would be changed from 1 to 2. How do i do this? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 If you want it to happen without leaving the page, javascript. Quote Link to comment Share on other sites More sharing options...
The Bat Posted February 11, 2007 Share Posted February 11, 2007 You could also possibly use $_GET. Link: <a href="yourpage.php?changevar=true">Change the variable!</a> Code on yourpage.php: $i = 1; if ($_GET['changevar'] == true) { $i = 2; // Other actions... } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.