Welcome Guest, Not a member yet? Register   Sign In
Can't set cookie
#3

[eluser]CroNiX[/eluser]
You can't read a cookie until the next request because it hasn't been written yet. It gets set when the whole page is sent as it gets transmitted along with the headers and not immediately when you call set_cookie(). The data is meant to be used in subsequent requests, not the current one.

http://php.net/manual/en/function.setcookie.php


Messages In This Thread
Can't set cookie - by El Forum - 10-26-2012, 02:39 AM
Can't set cookie - by El Forum - 10-26-2012, 05:46 AM
Can't set cookie - by El Forum - 10-26-2012, 08:12 AM
Can't set cookie - by El Forum - 10-26-2012, 08:15 AM
Can't set cookie - by El Forum - 10-26-2012, 08:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB