Preserved Topic: Cookie sucks! (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Lebanon |
posted 06-25-2001 11:37
Hi! |
Neurotic (0) Inmate Newly admitted |
posted 06-25-2001 13:58
Soemthing like this should work... code: <?
code: <?
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-26-2001 01:19
I actually had some problems using cookies with PHP as well, I never really pinpointed the problem and ended up using a Javascript solution instead. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 06-26-2001 07:56 |
Neurotic (0) Inmate Newly admitted |
posted 06-26-2001 08:36
That's funny Max I was going to say just about the same thing... |
Paranoid (IV) Inmate From: Lebanon |
posted 06-26-2001 15:00
well...i wanted an example with same page setting/updating values of a cookie easily! |
Neurotic (0) Inmate Newly admitted |
posted 06-26-2001 16:06
Nowhere did you mention that you wanted it on the same page...if you were more specific I could have told you it was not possible... |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 06-26-2001 20:45
Actually, you can set & read cookies on the same page, but you have to reload page after setting them. Here's one example from PHP's web site: |
Neurotic (0) Inmate Newly admitted |
posted 06-27-2001 08:10
That is my point, don't expect to set a cookie and read its newly set value on the same page...the new value of the cookie will only be available when the page is loaded again (it seems obvious to force the page to refresh)...my mistake I should have added that in as well...thanks for expanding max... |