Ok, I am at the library and I just got done reading the third book on 'cookies'. They all tell you that you need to send cookies with the headers, right? Then how in the bloody world are you supposed to have a form ask for information THEN based on that information create cookies? None of the books even go into that topic, they just pretend the browser already has cookies and all you're trying to do is read them.
Can someone show me how to do something like:
1) Check if cookie exists and is valid
2) If it doesn't exist or if it's incorrect, print html form
3) From HTML form set a cookie when they click submit
If a cookie exists {
if {#check for validity }
else { #exit}
}
else {
# since no cookie or no valid cookie was found, print HTML form asking
+ for input
#
# now that we have information, make a cookie, set it and refresh the
+page
}
Thanks everyone, I don't see why this topic isn't found in any of the books or docs I've read.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.