469,603 Members | 2,114 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,603 developers. It's quick & easy.

COOKIE (Javascript/PHP)

I have been experiencing a lot of troubles in reading a PHP COOKIE from
javascript.

if i write the cookie and read it in javascript in the same PHP file it
works well, but if i write the cookie for instance in a Javascript(AJAX)
called PHP file, the Javascript can read it.

Any ideas why?

This is a Javascript issue and not PHP, that's why im asking it here.

Kind regards,
RootShell
Apr 27 '07 #1
2 1588
On Apr 26, 4:14 pm, RootShell <rootsh...@ifreviews.orgwrote:
I have been experiencing a lot of troubles in reading a PHP COOKIE from
javascript.
There are not PHP or JavaScript cookies. There are just cookies and
PHP and JavaScript can read and manipulate them.
if i write the cookie and read it in javascript in the same PHP file it
works well, but if i write the cookie for instance in a Javascript(AJAX)
called PHP file, the Javascript can read it.
That is a mouthful of an explanation. I'm not clear what is the
problem but I'm guessing that there is something to do with the path
part of the cookie and that you are not setting that part at all or
correctly.

Peter

Apr 27 '07 #2
Peter Michaux wrote:
That is a mouthful of an explanation. I'm not clear what is the
problem but I'm guessing that there is something to do with the path
part of the cookie and that you are not setting that part at all or
correctly.

Peter
You are absolutely right...

I changed the path part of the cookie and it worked like it was supposed to.

Thanks for the 'late' feedback anyway.

Kind regards,
RootShell

Apr 27 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Stijn Goris | last post: by
reply views Thread by Phil Powell | last post: by
6 posts views Thread by Alexandre | last post: by
1 post views Thread by Display Name | last post: by
3 posts views Thread by M Wells | last post: by
10 posts views Thread by DoomedLung | last post: by
29 posts views Thread by Jerim79 | last post: by
16 posts views Thread by Stevo | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.