Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Setting a Cookie Value in php

Sun Oct 26, 2008 8:23 pm

Code:
<?php
setcookie
"myvalue1""myvalue2"time()+3600"/""www.codemiles.com");
?>
<html>
<head>
<title>Setting and printing a cookie value</title>
</head>
<body>
<?php
if ( isset( $myvalue1 ) )
    print 
"<p>Hello again, your value is $myvalue1</p>";
 else
    print 
"<p>Hello you. This may be your first visit</p>";
?>
</body>
</html>




Post a reply
  Related Posts  to : Setting a Cookie Value in php
 Cookie based login in php     -  
 Using Multiple Values for a Cookie in php     -  
 Use cookie to create page counter     -  
 Use cookie to create page counter     -  
 setting div background position     -  
 Dynamically Setting and Accessing Variables     -  
 (3.0.4) Skymiles Setting Fixed WIDTH     -  
 Setting maximum height of paragraph -P tag     -  
 Toggle the Multi Monitor Setting in Windows XP     -  

Topic Tags

PHP Cookies