This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

Simple Code To Set And Retrieve Cookie Using PHP

Setting a cookie using PHP

<?php
$expire=time()+60*60*24*30;
setcookie(“user”,”Balu”, $expire);
?>

<html></html>

Retrieve a cookie using php

<html>
<body>

<?php
if (isset($_COOKIE["user"]))
echo “Welcome ” . $_COOKIE["user"] . “!<br />”;
else
echo “Welcome guest!<br />”;
?>

</body>
</html>

Very simple is it….enjoy!!!!!!!!!!!!!!

VN:F [1.5.7_846]
Rating: 0.0/10 (0 votes cast)
VN:F [1.5.7_846]
Rating: 0 (from 0 votes)

Related posts:

  1. How To Set And Get Cookies Using PHP
  2. Warning: session_start(): Cannot send session cookie headers already sent

Leave a Reply

Comments (required)

Spam Protected