Quote:
Originally Posted by muchexie
I have created a log in system and logging in is functioning but logging out is not working its showing error warnings.
logout.php
[PHP]
<?
//include function files for this application
require_once("system_fns.php");
session_start();
$old_user = $valid_user; //store to test if *were* logged in
$result_unreg = session_unregister("valid_user");
$result_dest = session_destroy();
//start output html
do_html_header("Logging Out");
if(!empty ($old user))
{
if($result_unreg && result_dest)
{
//if they were logged in and are now logged out
echo "Logged Out.<br>";
do_html_url("login.php", "Login");
}
else
{
//they were logged in and could not be logged out
echo "Could not log you out.<br>";
}
}
else
{
//if they were logged in but came to this page somehow
echo "You were not logged in, and so you have been logged out.<br>";
do_html_url("login.php", "Login");
}
?>
[/PHP]
This is the error I'm getting.
Parse error: parse error, unexpected T_STRING, expecting ')' in C:\project\test\logout.php on line 11
Here is code at line 11
[PHP]
if(!empty ($old user))
[/PHP]
Any is greatly appreciated.
check this page
[PHP] do_html_header("Logging Out");[/PHP]
i am not able to see any extensions here