As part of Phase 2 of Version 6 of this site I have a few minor enhancements lined up. One of them is to start using Cookies to remember your name/email details. Should make life less hassle for the regular posters among you.
Has anybody used this method to good effect? Are there things I should know about? I'm having lots of problems with it. The combination of the SetHTTPHeader and GetHTTPHeader functions are a really useful addition, but they're so poorly documented it's ridiculous.
How about ideas on the easiest way to parse the Cookie name/value pairs? The server receives all name/value pairs as one string in the HTTP_Cookie field. The format is:
codestore_name=Jake; firstname.lastname@example.org; codestore_website=http://www.codestore.net;
From what I can tell browsers don't always send Cookies in the order you set them, so we can't guarantee name being at position 1 or email at 2 etc. So, how do we extract the name from the string easily? Maybe like this:
pairs:=@Explode(HTTP_Cookie; "; "); names:=@Left(pairs; "="); values:=@Right(pairs; "=");
values[ @Member(names; "codestore_name") ];
Anyway, I'm jumping the gun. I've a bug to resolve first. It's almost as if documents created with in-line forms get their computed fields processed twice. Once for the submitted data and once with no data. I'm pretty sure it's a bug, but I want to make sure I'm not just being stupid before I go shooting me big mouth off. More tomorrow...