note 46887 deleted from function.session-register by philip

From: Date: Wed, 29 Mar 2006 06:22:49 +0000
Subject: note 46887 deleted from function.session-register by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-106913@lists.php.net to get a copy of this message
Note Submitter: Andrew Hoyt ---- Yeah, I had an old PHP book that did things the old way, that was a headache. I found out that if one took the session variable: session_start(); //do some type of login login($username,$password); $_SESSION["username"] = 1; and made sure it was set equal to some value, you can check it on your pages with: if($_SESSION["username"] != 1) { print "you need to login"; //maybe some kind of site redirect here exit; } //Page content goes here

« previous php.notes (#106913) next »