02-14-2008, 12:55 AM
|
#8 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
I'm not entirely sure what you are trying to do, but in your original code, the reason it only increments it to 1 is because you are resetting the variable to 0 before you increment it.
I'm guessing that you want to do something like vBulletins thread views counter. The general idea is to get the number of views (ie, from a database), increment it by one, then store the new value back in the database.
If you wanted to update the page instantly, then use Ajax as Rendair suggested after you have read/write the values to the database.
Alan
|
|
|