Author Topic: Increase Variable onClick [Solved]  (Read 700 times)

I want to make a script where every time I call the function it increases a variable by 1. So for example: I click once, it goes from 0 to 1; I click again it goes from 1 to 2, etc.
« Last Edit: May 08, 2013, 10:07:56 AM by tommybricksetti »

In your function, use the variable incrementation syntax (++). Example: $myVariable++;

In your function, use the variable incrementation syntax (++). Example: $myVariable++;
fantastic, thanks so much. You get credit in script.

fantastic, thanks so much. You get credit in script.
$MyVariable += 1; works too.