Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Loging a user out with CGI and Cookies?

by LiTinOveWeedle (Scribe)
on Apr 16, 2001 at 15:17 UTC ( #72802=note: print w/replies, xml ) Need Help??

in reply to Loging a user out with CGI and Cookies?

Some times ago I wrote same script and one good brother in perl help me with this. So now try to help you...

He re is part of my program:

use CGI; $query = new CGI; sub logout { $cookie_expires = "-1s"; &cookie_create; print $query->redirect( -uri => $redirect_to, -cookie => $cookie ) +; } sub cookie_create { $cookie = $query->cookie(-name => $cookie_name, -expires => $cookie_expires, -domain => $cookie_domain, -path => $cookie_path, -value=>{ username => $username, password => crypt($password, $us +ername) } ); }

As you can see cookie_create sub can be also used to create cookie not only to erase it. This worked well, if you want all script which verify login again csv flat file user database I can send it to you.

Good luck

Li Tin O've Weedle
mad Tsort's philosopher

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://72802]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2021-10-23 12:24 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (88 votes). Check out past polls.