Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
The stupid question is the question not asked
 
PerlMonks  

Re^3: Cookies write to screen, not to cookie file

by sgifford (Prior)
on Jul 02, 2004 at 11:20 UTC ( [id://371418]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Cookies write to screen, not to cookie file
in thread Cookies write to screen, not to cookie file

As chromatic says, you need to display the form as one Web page, then submit it to a script that will output the cookie headers. That script will need to parse the information the user entered, then output the headers (including the cookie headers), then output the body of the Web page.

As for line endings in the headers, they are important, though whether you should use "\n" or "\r\n" may be Web server dependent (I usually use "\n", and assume my Web server will change it to a protocol-appropriate line ending). Line endings are how the Web server and browser know that one header has ended and the next has begun.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://371418]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.