in reply to Cookies, how can you set one if it must be done before the header?
Well thats one logic for it! Maybe a bit twisted as it is very late here. But YOU control the cookie.if cookie doesn't exist { if form input { #process form input validate if validate succeeds { generate cookie output new headers and success page exit } } else { generate headers (without cookie) generate form output all that }
I would suggest you find a good CGI course, there is a lot of good CGI stuff in the tutorials listed on this site. Anything which explains cookies will explain just how to go about doing this - the go and read the documentation for the CGI module on CPAN, or get the book "Official Guide to Programming with CGI.pm", it is all clearly explained in either place.
|
|---|