Quantcast
Viewing all articles
Browse latest Browse all 10

PHP Static variable reloads after Page Load

This is a simplified version of what I want to accomplish: In my script I want a static variable x to be incremented every time the submit button is pressed. <?php function IncX(){ static $x = 0; $x++; echo $x; } ?> <body> <form> <input type="submit" name="submit" class="next btn btn-primary" value="Submit" /> </form> </body> But […]

The post PHP Static variable reloads after Page Load appeared first on BlogoSfera.


Viewing all articles
Browse latest Browse all 10

Trending Articles