@NogDogMar 29.2005 — #Setting the cookie puts the necessary data into the HTTP stream to send it to the client (browser) with the rest of the header data. But the server doesn't receive the cookie back until the next time the browser loads it (it then sends the cookie data back to the server).
Also note that successfully setting a cookie does not guarantee that the browser accepted it, only that it was correctly sent to the browser.
@DARTHTAMPONauthorMar 30.2005 — #Well i know the browser is accepting the cookie becaue i am doing it on my own machine. To fix this would you reccommend just refreshing the page? would this fix the problem????
@NogDogMar 30.2005 — #Yes, I believe it would then "see" the cookie. Of course, if this is to become a public page at some point it's probably not ideal. ?
@Stephen_PhilbinMar 30.2005 — #The if should still work though. Well, according to the manual it should anyway.bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]][/QUOTE]
As you can see, it says it should return a boolean. ?
@DARTHTAMPONauthorMar 30.2005 — #when you say this is not ideal for a public page are you saying iit because of lack of encryption/sescurity/etc or that the refresh is a bad idea?
@NogDogMar 30.2005 — #ok then how would i get around this.[/QUOTE] Hard to say without knowing what it is you are trying to accomplish with that bit of code you showed us. If you just want to verify that the setcookie() worked, just do: [code=php] if(setcookie("dbworker", $worker, time()+200)) { # good } else { # bad } [/code]