hi to all,
I use session (CGI::Sessions) to record some data in a textual search-engine (CQP). I have this problem: I need to destroy a session before starting the new one, but I cannot.

actually I wrote this code:


$qualecookie = $pagina->cookie(CGIRICERCA);
if($qualecookie)
        {
$session = new CGI::Session(undef, $qualecookie, {Directory=>'/tmp'});
        $session->delete();
        }

the cookie CGIRICERCA store the session ID, so, when the user come again in the first page I verify his/her cookie: if (s)he has the cookie I delete the session... er, I would delete it.
Someone can show me the error?


another way to solve my problem would be deleting the cookie only, for example with:

        $pagina->cookie(-name=>'CGIRICERCA',-value=>"");

but: how can I delete a cookie before a redirection (without header writing)?


thank you all,

alladr

|^|_|^|_|^|                              |^|_|^|_|^|    
 |            |                                 |            |
 |            |                                 |            |
 |            |*\_/*\_/*\_/*\_/*\_/* |            |
 |                                                           |
 |                                                           |
 |                                                           |
 |         http://www.e-allora.net        |
 |                                                           |
 |                                                           |
**************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to