0

I am trying to set a page for logout from a service I use but need to kill the $_REQUESTprovided by that service so my logout and redirect works.
I have tried the following with no luck

unset ($_REQUEST['login]');
header ("Location: http://www.mysite.com/mypage.php");

There has to be some way to either delete the variable or to be rid of the entire request array.

Please help.

4
Contributors
7
Replies
11
Views
8 Years
Discussion Span
Last Post by somedude3488
0

You May Use This Code for Destroy Your Login Session and Create a logout Page. Use the Below Specified Code it's Work Greate for me:

<?php
session_start();
session_unset();

session_destroy();
// Logged out, return home.
print '<script> alert ("You Have Successfully Logged Out.");
window.top.location.href = "index.php";; </script>';
?>

0

You May Use This Code for Destroy Your Login Session and Create a logout Page. Use the Below Specified Code it's Work Greate for me:

Accept becraig isn't using sessions. becraig is removing the elements of the post and url variables which together form $_REQUEST.

0

oh!!!!!!
okay @above youare right.
i am not seeing fully or understand something wrong.
sorry for it.
but Thanx for Your comment.

0

I entered incorrectly when posting here but the quotes are correct in the code I am using.

I am at the point of tearing my hair out there has to be some way to do this.

0

ok I am able to unset the array using:

<?php
foreach ($_REQUEST as $i => $value) {
    unset($_REQUEST[$i]);}
header ("Location: http://www.mysite.com/logoutaction.php");

?>

However if I do not do the header the array clears, but when I do the header the array stays in tact ????

0

Can you explain your system better? Honestly, I don't see why you need to unset something in the _REQUEST array. There is probably a different way to go about what you are trying to do.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.