I set cookie by this code
setcookie($cookieName, $value);
And get cookie by this
filter_input(INPUT_COOKIE, $cookieName);
But I get wrong value. Can you help?
I set cookie by this code
setcookie($cookieName, $value);
And get cookie by this
filter_input(INPUT_COOKIE, $cookieName);
But I get wrong value. Can you help?
Look how you use the code written by you, if you perform both actions on one script, then this is a logical result. Try this instead:
Set cookie:
setcookie($cookieName, $value);
Update your web page. And then get cookie:
filter_input(INPUT_COOKIE, $cookieName);
Hope this is resolve your issue.