Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001122

[PHP] Re: session destroy ?? From: Chris Lee (lee <email protected>)
Date: 12/19/01

<?php
 session_start();
// destroy the session
 session_destroy();
 $p = session_get_cookie_params();
// destory the cookie
 setcookie(session_name(), '' , 0, $p['path'], $p['domain']);

// redirect without the SID for trans-sid users
 header("Location: http://$SERVER_NAME");
?>

works for me. yes its stupid, but a session has to be started beore it can
be destroyed.

--

Chris Lee lee <email protected>

"Olivier Masudi" <olivier <email protected>> wrote in message news:NFBBIBOOOLLPDLDCDJMMEEDGCDAA.olivier <email protected> > In my online store i use session. > > I use a script to check that a user dont make 2 order during the same > session using the back button for that i put his sessionid in the db and > check it before processing the order. > > My probleme is how can i give a new session_id to the person when he goes > back to the home page of my site so he can do a new order ? > > I try session_destroy , session_unset > but the person have still the same session_id > > REMARK > > I always use the same string into session_name("abcdef") for all the user. > Is it a problem? > > > Thanks for your help >

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>