faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

7 of 33 people (21%) answered Yes
Recently 1 of 10 people (10%) answered Yes


How do I make make a session counter without using a database, aka using application level variable?

Feb 22nd, 2008 20:14
dman, Jonathan Sharp, Chris Hilbert, http://www.ttnr.org

If you are using phps sessions. All you have to do is session_register
('counter'); and then $counter is a variable that is carried across 
that user's session. So all you have to do is $counter++
Otherwise, your best bet is to just have a file and increment that...