Page 1 of 1

When to call a users online script

Posted: Thu Jun 17, 2004 11:57 pm
by pinehead18
Ok, after studying some code, i understand how to create a users online script using a db. Basically i just call the db and insert all the info in the db with a time out. HOwever, when do i call this? Righ tunderneith everypage right under session_start();?

Thank you
Anthony

Posted: Fri Jun 18, 2004 12:04 am
by feyd
it should happen after session_start() (at the top of the page). Store the information in a string, and echo/print/parse it into the html where you want it.

Posted: Fri Jun 18, 2004 12:19 am
by pinehead18
and this should happen on every page weather their is a user logged in or not correct/

Posted: Fri Jun 18, 2004 12:29 am
by feyd
yes.