[thelist] any JS cookie experts out there?

Steve Webster steve at netbreed.co.uk
Mon Dec 16 16:39:08 CST 2002


Tom,

> I've got this job where I am working some of my own PHP pages into
> Kurant StoreSense, which I believe runs on PowerBuilder.
>
> My pages are php, so the user pops into my pages to register, and
> then I need to write some cookie info in JS to it gets passed along
> as they work in StoreSense.
>
> So when the person registers, I write this:
>
> document.cookie = "data=<?=$data?>";
[snip]

Are you ending up in a position where this code is actually writing a
null value to the cookie (which is how cookies are deleted)? If you're
ever in a position where $data doesn't exist or is empty then you're
going to end up removing the cookie!

Just a thought!

Regards,

Steve

--

================================
  Steve Webster
  Freelance Web Developer
  steve at codejunkie.co.uk

  PHP, MySQL, Flash, Perl + more
  http://www.codejunkie.co.uk
================================





More information about the thelist mailing list