I have a variable in php, called $number
, and I have a submit button:
<form method="get"><button type="submit" value="<?php echo $number; ?> name="next">Next</button></form>
.
What I'd like to achieve, is to increase the value of that variable, by 10 for example, every time the form is submitted.
First this is how I'd tried it:
if(isset($_GET['next'])){
$number+=10;
}
But this code only increases its value once.
I've tried several methods that are not really worth mentioning, but none of them worked unfortunately.