2 Apr 2009 02:33
Re: Cookie question
It's been a long time and I've finally had some time to revisit this
code, if I recall correctly I had it kind of working last time with
the *Cookies global as per the instructions in the prior post by Alex,
however when I run the application with the newest pico I get nowhere,
I don't know if something new has been introduced but I've been
following the discussions and I don't think so, but I'm not 100% sure,
hence this post.
This is what the relevant code looks like at the moment:
(de signin ()
(app)
(action
(rss-html
(form NIL
(<table> NIL NIL NIL
(<row> NIL "Username" (gui 'uname '(+TextField) 10))
(<row> NIL "Password" (gui 'pwd '(+PwField) 10))
(<row> NIL
(gui '(+Button) "Login"
'(let Uid 1118474715114943738 # (chkLogin (val>
(: home uname)) (val> (: home pwd)))
(if Uid
(prog
(cookie 'uid Uid)
(setq *Cookies (cons 'uid Uid))
(redirect (pack *Domain " <at> desktop")))
(err "Could not login.")))))
(<row> NIL (<href> "Sign Up" " <at> register")))))))
(Continue reading)
. Maybe now
is the right time to go ahead with the fix?
I would suggest putting this in <at> lib/http.l:
(de cookie <at>
(let At (rest)
Cheers,
- Alex
RSS Feed