@MindzaiOct 20.2009 — #Every time the page loads the script will start from fresh and not remember any values from last time. Probably the easiest way of persisting data accross pages is via a session.
@MaaaTtYauthorOct 20.2009 — #damn. i also realised what i was doing was only being executed before the page loaded not when a button was clicked ( i dont even know if thats possible). anyways, this is for a project and im not allowed to use a session or GET and POST.
@YelgnidrocOct 20.2009 — #I can't see how you can change a [B]php variable[/B] without using a session, GET or POST. Well, not in any useful way.
You could save the php variable to a database / file / cookie, click a button that will reload the page (or re-direct) and then read back from the database / file /cookie and increment it. This obviously has limitations!!
I don't think that javascript can change php variables.
@ssystemsOct 21.2009 — #I would go for post/session as well.But without a clearer view of what you're trying to achieve we can't really help a lot. Good Luck.