vikaspa Posted April 22, 2009 Share Posted April 22, 2009 dear All I have typical problem here refer http://www.ethnicjewel.in/subcategory.php?cid=13 one can login using following details user : orton@rdiffmail.com password 12345678 and wel come etc details appears when I click on logout it logs out perfectly fine but the page cannot be displayed properly as its parameter for query is nullified and we get following error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 when i saw address ontop it was http://www.ethnicjewel.in/subcategory.php and not http://www.ethnicjewel.in/subcategory.php?cid=13 can we avoid this ? script in loout.php <?php session_start(); session_unregister('Username'); session_unregister('UserGroup'); unset($_SESSION['Username']); unset($_SESSION['UserGroup']); $loginstatus = 0; $logoutGoTo = $_SESSION['referpage']; header("Location: $logoutGoTo"); ?> I noticed that the $logoutGoTo has correct page value but the parameter for the query is null Quote Link to comment Share on other sites More sharing options...
jackpf Posted April 22, 2009 Share Posted April 22, 2009 Why not only run the query if $_GET['cid'] is set? Otherwise, echo something like "you need to select a subcat"? Quote Link to comment Share on other sites More sharing options...
avvllvva Posted April 23, 2009 Share Posted April 23, 2009 Post your SQL query & content of $_SESSION['referpage'] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.