Jayne Herbert
Server Side Programming (PHP) Course
CITN270 – September 2009

Home - assignment 1 - assignment 2


 

 

Testing the cookie

Cookies/Testing the cookie

 

still not set!
!
!


 

This test to see if a cookie called "namecookie" has been set and is still active

if (isset($_COOKIE["namecookie"]))

This will print the contents of "namecookie" if it has been set and is still active

echo "Welcome " . $_COOKIE["namecookie"] . "


If it does not find the contents of "namecookie" if it has been set and is still active it will report a message

else

echo "still not set!


 

Now use a form to enter the cookie

 

 

 


 

 

phpcourse.jayne-herbert.co.uk