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

Using Multiple Values for a Cookie in php

Sun Oct 26, 2008 8:16 pm

Code:
<?php
  
if (!isset ($userdetails [0] ) ) {
     
setcookie ("userdetails[0]"$username);
  }
  
$userdetails[1]++;
  
setcookie ("userdetails[1]"$userdetails[1]);
  echo (
"Hello $userdetails[0], you've seen this page".$userdetails[1].($userdetails[1] == l?" time!""times!"));
?>




Post a reply
  Related Posts  to : Using Multiple Values for a Cookie in php
 Setting a Cookie Value in php     -  
 Cookie based login in php     -  
 Use cookie to create page counter     -  
 Use cookie to create page counter     -  
 Multiple Inheritance     -  
 Multiple Exception Catching     -  
 Jtable with multiple headings     -  
 Code to open multiple links.     -  
 calculate data from multiple selection     -  
 send mail to Multiple recipients     -  

Topic Tags

PHP Cookies