turkman Posted November 14, 2008 Share Posted November 14, 2008 Keep getting this error Parse error: syntax error, unexpected T_VARIABLE in /home/mushycom/public_html/logout.php on line 4 <?PHP session_start(); session_destroy(); header("LOCATION:http://www.sitename.com"); ?> Link to comment https://forums.phpfreaks.com/topic/132681-help-with-logoutphp/ Share on other sites More sharing options...
runnerjp Posted November 14, 2008 Share Posted November 14, 2008 looks fine 2 me Link to comment https://forums.phpfreaks.com/topic/132681-help-with-logoutphp/#findComment-690049 Share on other sites More sharing options...
DarkerAngel Posted November 14, 2008 Share Posted November 14, 2008 <?php session_start(); session_destroy(); header("Location: http://www.sitename.com"); ?> All i can do is offer that cleaned up a bit... Location: and the "URL" usually have a space separating them but that don't explain your error Link to comment https://forums.phpfreaks.com/topic/132681-help-with-logoutphp/#findComment-690050 Share on other sites More sharing options...
turkman Posted November 14, 2008 Author Share Posted November 14, 2008 what could it be? Something to do with the way i set the session variables? Link to comment https://forums.phpfreaks.com/topic/132681-help-with-logoutphp/#findComment-690064 Share on other sites More sharing options...
lifetalk Posted November 14, 2008 Share Posted November 14, 2008 Seems to work perfectly.. tried it out by pasting the code in notepad and testing on my local server... Link to comment https://forums.phpfreaks.com/topic/132681-help-with-logoutphp/#findComment-690065 Share on other sites More sharing options...
xcoderx Posted November 14, 2008 Share Posted November 14, 2008 try this <?php session_start(); session_destroy(); header('Location: logout.php'); exit; ?> Link to comment https://forums.phpfreaks.com/topic/132681-help-with-logoutphp/#findComment-690066 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.