im just wondering, how you would have a value increase, decrease EVERY time you initiate an option to have it increase or decrease.
For example, i have a form, with a submit button. If you click the button, the value (lets say at 100), goes down by 10. So after clicking the new value would be 90. Click it again and it goes to 80... and so on until the value is equal to 0. Same thing goes for increasing.
I had this coded so far:
<?php
$value = 100;
if ( $action ) {
$value = $value - 10;
}
print "$value";
?>
<form action = "fight.php">
<input type="submit" value="Click" name="action">
</form>
It does decrease the value by 10, so the new value is 90. But if i click it again, nothing happens and it just stays at 90. I need it to keep decreasing, AS WELL as keep the new value permanately.
Hope anyone can help me..