techiefreak05 Posted April 17, 2007 Share Posted April 17, 2007 im REALLY confused as to why i JUST am NOW getting this error... Parse error: parse error, unexpected ';' in /homepages/5/d191754224/htdocs/search/logout.php on line 18 in this page: <?php session_start(); if(!isset($_SESSION['email'])){ echo $_SESSION[id]; echo $_SESSION[fname]; echo $_SESSION[email]; echo $_SESSION['id']; echo $_SESSION['fname']; echo $_SESSION['email']; ?> Error, you are not current logged in, please <A HREF="/?">Go Home</a> <?php }else( // LINE 18 as stated in error // mysql_query("UPDATE `users` SET `status` = 'Offline' WHERE `id` = '$_SESSION[id]'"); unset($_SESSION[email]); unset($_SESSION[fname]); unset($_SESSION[id]); $_SESSION = array(); session_destroy(); ?> <center><h4>Logging Out ...</h4></center> You have successfulyl logged out! please <br><br><A HREF="/?">Go Home</a> <? } ?> that exact code.. the way it is now.. was working not 1- mintues ago... but not anymore.. i changed NOTHING Link to comment https://forums.phpfreaks.com/topic/47330-solved-unexpceted-error-was-just-working-fine/ Share on other sites More sharing options...
Glyde Posted April 17, 2007 Share Posted April 17, 2007 <?php session_start(); if(!isset($_SESSION['email'])) { echo $_SESSION['id']; echo $_SESSION['fname']; echo $_SESSION['email']; echo $_SESSION['id']; echo $_SESSION['fname']; echo $_SESSION['email']; ?> Error, you are not current logged in, please <A HREF="/?">Go Home</a> <?php } else { mysql_query("UPDATE `users` SET `status` = 'Offline' WHERE `id` = '{$_SESSION['id']}'"); unset($_SESSION['email']); unset($_SESSION['fname']); unset($_SESSION['id']); $_SESSION = array(); session_destroy(); ?> <center><h4>Logging Out ...</h4></center> You have successfulyl logged out! please <br><br><A HREF="/?">Go Home</a> <? } ?> Your else statement was coded as: } else ( instead of } else { Link to comment https://forums.phpfreaks.com/topic/47330-solved-unexpceted-error-was-just-working-fine/#findComment-230878 Share on other sites More sharing options...
techiefreak05 Posted April 17, 2007 Author Share Posted April 17, 2007 wow ... thx. haha. but why would it work before and not now? i haven't edited it at all. Link to comment https://forums.phpfreaks.com/topic/47330-solved-unexpceted-error-was-just-working-fine/#findComment-230879 Share on other sites More sharing options...
AndyB Posted April 17, 2007 Share Posted April 17, 2007 wow ... thanks. haha. but why would it work before and not now? i haven't edited it at all. Either you had a different version 'edited' or you're using Windows and Windows does weird stuff. Assuming the coding problem - unlike the mysterious "hadn't edited" - is solved, would you please mark it so. Link to comment https://forums.phpfreaks.com/topic/47330-solved-unexpceted-error-was-just-working-fine/#findComment-230882 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.