06 cookie Program PHP- record

sava--cookie6.php 

program:-

 <?php
$cookie_name = "user";
$cookie_value = "IBM Degree College";
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day
?>
<html>
<body>

<?php
if(!isset($_COOKIE[$cookie_name])) {
  echo "Cookie named '" . $cookie_name . "' is not set!";
} else {
  echo "Cookie '" . $cookie_name . "' is set!<br>";
  echo "Value is: " . $_COOKIE[$cookie_name];
}
?>

</body>
</html>

output:-01



 

output:-02

 

Comments

Popular posts from this blog

e-com sem-3

SOFTWARE

e com partical

unit-1 E- Commerce

Unit 2: Foundations of Ownership, Security Related Concepts in Blockchain

Unit-V: Image Manipulations, Audio and Video & Introduction to JavaScript

Unit-III: Cascading Style Sheets (CSS) - HTML

Computer Operations and Performing - D L Unit-1-1

Unit-II: HTML Coding Standards & Elements

digital marketing ppt-u1