Articles: 843 | Categories: 148   
   
   
Home Articles Contact Us
 
 
 
 
Save Info to a Cookie With Variable (0 Comments)
Admin: Posted Date: March 3, 2010

This snippet shows how to save information to a cookie using a variable. More informatiom about cookies can be found on the site.

Save Information to a Cookie using a Variable

This snippet shows how to save information to a cookie using a variable.

<?php



// lets create a variable named

// $strCity and make its value

// New York

$strCity = "New York";



// now save the variables contents

// to a cookie called City

setcookie("City", $strCity);



// done

?>
    

 

 
 
Add a Comment:
 
(You must be signed in to comment on an article. Not a member? Click here to register)
   
Title:

Comments: