David

> problem is, the cookie only comes into effect after I've clicked thru to
> another page from login.php...any ideas on this?

You don't explain why you need to access the cookie immediately.

If you just want to check it has been accepted, the usual approach is to use
headers to do a redirect back to the same script. Then you can check if the
cookie is there. You need to use a POST or GET variable to indicate whether
you are in cookie writing or cookie checking state.

If this is a public site, be aware that some search engine bots don't like
fast redirects and will not index anything below this script on the site.

You can also do this with JavaScript I believe - not very reliable on the
open web though as it may be missing/turned off in the target browser. If
you look at the archives for the general mailing list you will find some
sample code.

Hope this is useful

Geoff Caplan


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to