Jump to content

[SOLVED] A little Cookie problem


npsari

Recommended Posts

Hi there,

 

I set up a php page which has this little code

 

<?php 
setcookie("try", "Me Try", time()+3600);
?>

 

then, when i try to read it from any other directory, i cant

<?
echo "Welcome " . $_COOKIE["try"] . "!";
?>

 

I only can read it if i upload the script in the same directory where the cookie was set

 

How can i make a cookie, where all pages can read it, is that possible

Link to comment
https://forums.phpfreaks.com/topic/77053-solved-a-little-cookie-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.