PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm just trying to do a basic setcookie to keep track of users. I've tested my pages in explorer and netscape, but for some reason it will not set the cookie in safari. I'm using this code as a test:
i have the latest version of safari and i've checked my cookies settings. cookies on other sites work fine, but for some reason it will not set the cookie for my website. any idea what could be causing the problem?
The cookies are not supposed to be sent back to the same page that set it (in one http request).
it [the http request] looks like this
your browser requests the page and sends any cookies it already has
server sets the cookie
so on the first connection the page has already been requested without any cookies being sent to your script, this is why you will not see the cookie being set on the same page like you posted. As for why it worked with firefox it might've done a HEAD request to get the cookies before loading up the page? It also might be related to multi-piping (multiple requests per page to speed up loading)
that makes sense, but even if i request the cookie from another page, or look for the cookie itself on my hard drive, it isnt there. its not setting it at all. unless i use a browser other than safari and then it will set it.