Creating a Test Cookie : Cookie « Cookie Session « PHP






Creating a Test Cookie


<?php
  $string_name = " testcookie";
  $string_value = "This is a test cookie";
  $expiry_info = time()+259200;
  $string_domain = "localhost.localdomain";

  setcookie($string_name, $string_value, $expiry_info, $string_domain);
?>
           
       








Related examples in the same category

1.Using Multiple Values for a Cookie
2.Use cookie to create page counter
3.Setting and Printing a Cookie Value