Hi,
I have two php pages.
On the first php page called process.php I have the following code:
setcookie('username', 'dan', time() + 2592000 , '/');
And when I use the following code in this page:
$username = $_COOKIE['username'];
if (isset($username)) {
echo $username;
Everything works fine, and I get the username printed.
In the second php page called check.php I have the same code for checking the value of the username, and I get noting.
The purpose of cookies is to enable us to pass data between different pages, but it doesn't work for me.
Can you please assist me in understanding what I am doing wrong?