Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Creating Sessions

by bradcathey (Prior)
on Dec 22, 2005 at 01:12 UTC ( [id://518456]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use CGI qw/:cgi/;
    use Data::Dumper;
    ...
    
    my $cookie = $query->cookie(CGISESSID => $session->id );
    print $query->header(-cookie => $cookie);
    
  2. or download this
    my $session_id = cookie('CGISESSID');
    my $session = new CGI::Session("driver:File", $session_id, {Directory=
    +>'/tmp'});
    ...
       my $user_id    = $session->param('user_id');
       my $user_name = $session->param('user_name');
    }
    
  3. or download this
    use base 'CGI::Application';
    use CGI::Application::Plugin::Session;
    ...
       $self->session->param(user_id    => $user_id);
       $self->session->param(logged_in  => 1);
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-18 03:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found