Sessions, ending and starting new with just a click
| From: | Robert Sossomon | Date: | Wed, 03 Dec 2003 16:02:45 +0000 |
| Subject: | Sessions, ending and starting new with just a click | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-171682@lists.php.net to get a copy of this message | ||
Hey guys and gals,
I am working on a shopping cart and using some code to write it from 2
temp databases to a full end databases (which will then be used via PERL
to send to an archaic order system) but right now I need to come up with
a way to clear their current session ID after finalizing the order and
then dropping them into the new session variable so they can start a new
order.
I currently have:
<?php
/////////////////////////////////////
//
// new.php
//
// Start over the PHP session and start anew. This will also erase the
cart
// contents right away from the database to keep things clear.
//
// Version 1
//
/////////////////////////////////////
session_start();
session_destroy();
unset($PHPSESSID);
header("Location:seestore.php");
exit;
?>