Jump to content

Page Refresh

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
dirkfirst

dirkfirst

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 354 posts
Is there a way to increase a variable by one or any other number every time the page refreshes. How would PHP even know that the page was being refreshed?

#2
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
sorta counter?

#3
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts

dirkfirst said:

Is there a way to increase a variable by one or any other number every time the page refreshes. How would PHP even know that the page was being refreshed?

If you use php in conjunction with mysql it can easily be done. Just create a value in a database and start it at zero. Each time the page loads include a sql query that gets the current value in the database and then adds one to it and then replaces the old value in the database with the new one.