Mblind21
11-30-2004, 04:41 PM
Posting this on behalf of a friend.
--------------------------------------------------------------------------------
quote:
--------------------------------------------------------------------------------
deagles :
<?php
session_start();
if($_SESSION['login'] != "valid")
{
header("Location:index.php");
}
?>
deagles : alright, when you login successfully $_SESSION['login'] = "valid"
deagles : so when someone who hasn't logged in tries to access the member's page, that script above should redirect them to the index page because $_SESSION['login'] was never set to valid
deagles : but it doesn't work
deagles : i keep getting this:
Notice: Undefined index: login in c:\inetpub\wwwroot\hades\members.php on line 3
Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\hades\members.php:3) in c:\inetpub\wwwroot\hades\members.php on line 5
--------------------------------------------------------------------------------
This installation can be found at www.i-burn.net/hades/login.php
If you could reply to this and help me out, please post here! :D
Thanks in advance!
--------------------------------------------------------------------------------
quote:
--------------------------------------------------------------------------------
deagles :
<?php
session_start();
if($_SESSION['login'] != "valid")
{
header("Location:index.php");
}
?>
deagles : alright, when you login successfully $_SESSION['login'] = "valid"
deagles : so when someone who hasn't logged in tries to access the member's page, that script above should redirect them to the index page because $_SESSION['login'] was never set to valid
deagles : but it doesn't work
deagles : i keep getting this:
Notice: Undefined index: login in c:\inetpub\wwwroot\hades\members.php on line 3
Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\hades\members.php:3) in c:\inetpub\wwwroot\hades\members.php on line 5
--------------------------------------------------------------------------------
This installation can be found at www.i-burn.net/hades/login.php
If you could reply to this and help me out, please post here! :D
Thanks in advance!
