I have a bit of a problem with reseting the variable value of a submit button.
At the moment i have a button like this:
<input type="submit" name="add" value="Add to Shopping Basket"/>
When this is pressed it performs a function, below is how i know if it has been pressed
if($add){
...........(CODE).....
}
However after I have pressed the button once, $add stays true. So when I just look at things on this page, but press the BACK button on IE, instead of the add button, it still executes the code within the if($add) statement.
I know the $add variable is staying true, but i can't get it to go back to false, so this problem won't occur. Any idea's? It would be much abliged.
Thanks
Gary