in reply to Re^5: cookie problem
in thread cookie problem

I see several issues, but the key one is this one in wel.pl
$sid = $cgi->param('login');

You don't retrieve cookie data via the param() method, you retrieve it using the cookie() method.
my $sid = $cgi->cookie('login');

Replies are listed 'Best First'.
Re^7: cookie problem
by bigup401 (Pilgrim) on Nov 13, 2014 at 09:37 UTC
    i tried it as u said bt still redirect me back

      Where is the username and password entered ?

        in html source

        <input type="text" name="username"/> <input type="password" name="password"/>

        and i did as u side

        my $cgi = CGI->new(); my $sid = $cgi->cookie('login'); if ( ! $sid ){ print $cgi->redirect(-uri=>"home.pl", -cookie=>$cookie); } else { print $cgi->header(-cookie=>$cookie); }