Page 1 of 1

session login and logout

Posted: Thu Jun 26, 2008 5:05 am
by ma5ect
Hi,

On my website i am trying to end a session and return to another page but i keep gettin this error..

Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.


Code: Select all

<?
session_start();
if (!session_is_registered(myusername)) {
     header("location:mainlogin.php");
    }
?>
 
<html>
<head><title>Welcome</title>
</head>
<body>
<h1> Login successful</h1>
 
<p>
<a href="logout.php"> Log Out!</a></p>
 
 
</body>
</html>

Re: session login and logout

Posted: Thu Jun 26, 2008 8:09 am
by jayshields
Try wrapping myusername in quotes?

Re: session login and logout

Posted: Fri Jun 27, 2008 5:24 am
by ma5ect
thanx for post...i have solved the problem