Page 1 of 1

Session

Posted: Sun Oct 03, 2004 6:56 pm
by moiseszaragoza
Hi Everyone. I was wandering if anyone knew hot to save a variable in a session?

Thanks for all of your help

Posted: Sun Oct 03, 2004 7:07 pm
by McGruff
session_start() does what it says on the tin. You must call session_start() before any browser output.

Next, just declare session keys and values:

Code: Select all

$_SESSION['foo'] = 'bar';