Facebook Twitter Reset

This Tutorial Has Been Viewed 414 Times.

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.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: -1 (from 1 vote)

Incoming search terms:




You will also be interested in ,

No comments yet.

Leave a Comment

Spam protection by WP Captcha-Free

Affordable Seo PackagesSeo BlogEdu Backlinks
More in Others (5 of 9 articles)