|
Posted by Leif Gregory on 05/15/05 01:25
Hello Cima,
Friday, October 14, 2005, 12:33:57 PM, you wrote:
C> any info will be highly appreciated!!
The easiest way to handle this is to set a session variable once
they're authenticated and on all your pages you have something like
this:
session_start();
if (!$_SESSION['isAuthenticated'] == "Yeppers")
include('auth.php');
IIRC you have to use include() vs. require() because a require()
would force auth.php regardless of the outcome of the if statement.
I'm pretty sure I remember reading this somewhere, but I could be
wrong.
By using the session variable you only force an auth for people who
already haven't authenticated.
If you're not familiar with sessions, the key thing to remember is you
need to do a session_start(); somewhere in the page prior to reading
or writing session variables.
Cheers,
Leif Gregory
--
TB Lists Moderator (and fellow registered end-user)
PCWize Editor / ICQ 216395 / PGP Key ID 0x7CD4926F
Web Site <http://www.PCWize.com>
Navigation:
[Reply to this message]
|