SDP2006
10-04-2003, 02:55 PM
I've known how to do this, but It keeps leaving my memory.
I set the cookie
<?php
$yours = $_POST['name'];
setcookie("thename",$yours,time()+31536000);
echo "The cookie has been set. It will remain for one year unless you delete the cookie. If you delete it, you will have to come back here to reset it!";
?>
and then check for it and echo it
<?php if(isset($_COOKIE['thename'])){
echo 'Welcome'.$_COOKIE['thename'];
}
else{
echo "Welcome!";
}
?>
It is just echoing Welcome! if when the cookie isset...
All help is sincerely appreciated...
I set the cookie
<?php
$yours = $_POST['name'];
setcookie("thename",$yours,time()+31536000);
echo "The cookie has been set. It will remain for one year unless you delete the cookie. If you delete it, you will have to come back here to reset it!";
?>
and then check for it and echo it
<?php if(isset($_COOKIE['thename'])){
echo 'Welcome'.$_COOKIE['thename'];
}
else{
echo "Welcome!";
}
?>
It is just echoing Welcome! if when the cookie isset...
All help is sincerely appreciated...