I have tried to set a cookie on this page, like this:
<?phpsetcookie("fasciaoffer", $name, time()+36000);?>
I have verified that the cookie is set.
I then want to retrieve the cookie when my customer views their shopping basket and display a message:
<?phpif (isset($_COOKIE["fasciaoffer"])) echo "<b>Special offers available</b> - buy any 3 covers & get your 4th choice free! " . $_COOKIE["fasciaoffer"] . "!<br />";else echo "<b>Special offers available</b> - none available on current order<br />";?>
However, the message that comes up in my shopping basket is the one where the cookie has not be found.
What could the problem be? Is my coding correct?
PS. The file which the retrieve bit is in (the shopping basket) is not in the root folder.