in reply to Re: Receiving Cookie Values
in thread Receiving Cookie Values

That didnt work either, here is what the browser says when It prompts to accept the cookie:

---
This page wishes to set the cookie
wintermarket_members_user="%24user"
---
And its the same thing with the password =\

I noticed in the 'cookie setting example' that you linked to, it escaped out the hash like so:
$the_cookie = cookie(-name=>'animals', -value=>\%zoo, -expires=>'+1h');
Could this have anything to do with it?

Here is my code:
my ($usr,$pw); if ($ENV{'HTTP_COOKIE'}) { # from cookie $usr = $wm->cookie('wintermarket_members_user'); $pw = $wm->cookie('wintermarket_members_pass'); } else { # from form $usr = $wm->param('usr'); $pw = $wm->param('pw'); } &set_cookie($usr,$pw,$wm); #... in set_cookie sub my $cookie_usr = $input->cookie(-name=>'wintermarket_members_user', -value=>$usr, -expires=>'+1h'); my $cookie_pw = $input->cookie(-name=>'wintermarket_members_pass', -value=>$pw, -expires=>'+1h'); print $input->header(-cookie=>[$cookie_usr,$cookie_pw]);
But thanks for the help dingus :)
^jasper

Replies are listed 'Best First'.
Re:(3) Receiving Cookie Values
by dingus (Friar) on Dec 05, 2002 at 08:31 UTC
    This page wishes to set the cookie
    wintermarket_members_user="%24user"

    OK - %24user is the escaped version of $user. So I think somewhere you are setting the parameter $usr to '$user' not to "$user"

    I think your cookie setting code looks OK. Its that you are settign the wrong values somehow. have you checked the values of param('usr') and param('pw') ?

    Dingus


    Enter any 47-digit prime number to continue.
      Hrmm, i posted couple days ago, but i guess it didnt post... *shrugs*

      That code worked, thanks :)

      ^jasper
      Nevermind, It works now.
      Yeah, I've checked the params and they were the username and password. Still don't know why it was setting the escaped $user/$pass, but its working now.

      Thanks for the help :)
      ^jasper <jasper@wintermarket.org>