Hi Guys,
Please HELP! I'm new to PHP and would like to get your professional
help!
I"m writing simple and small login app using php session variable. I
have 3 php scripts. The first is just a simple php form, login.php,
that passes the variables to auth.php.
Auth.php just validates that the username and password is correct. If
they match, i will set the php session,
$_SESSION['logon'] = "ok", then redirect the user to anothor page,
ADMIN.PHP
ADMIN.PHP:
<?
session_start() ;
if ($_SESSION['login'] != "ok")
header("Locatio n: login.php");
else
/* do some stuff 8/
?>
My code works well on the login.php and auth.php. But for some reason,
when I get to ADMIN.PHP, it says that they it has an "UNDEFINED INDEX,
LOGIN".
Can anyone help me or have a sample php program that uses sessions for
login?
Much Help would be appreciated.
Thanks in advance,
PHP NOOBIE
Please HELP! I'm new to PHP and would like to get your professional
help!
I"m writing simple and small login app using php session variable. I
have 3 php scripts. The first is just a simple php form, login.php,
that passes the variables to auth.php.
Auth.php just validates that the username and password is correct. If
they match, i will set the php session,
$_SESSION['logon'] = "ok", then redirect the user to anothor page,
ADMIN.PHP
ADMIN.PHP:
<?
session_start() ;
if ($_SESSION['login'] != "ok")
header("Locatio n: login.php");
else
/* do some stuff 8/
?>
My code works well on the login.php and auth.php. But for some reason,
when I get to ADMIN.PHP, it says that they it has an "UNDEFINED INDEX,
LOGIN".
Can anyone help me or have a sample php program that uses sessions for
login?
Much Help would be appreciated.
Thanks in advance,
PHP NOOBIE
Comment