Jump to content

retain the same page after logout


vikaspa

Recommended Posts

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

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.