How to add a cookie?
Answers were Sorted based on User's Feedback
Answer / rupali
bool setcookie ( string $name [, string $value [, int
$expire [, string $path [, string $domain [, bool $secure
[, bool $httponly ]]]]]] )
for e.g.
<?php
$value = 'something from somewhere';
setcookie("TestCookie", $value);
setcookie("TestCookie", $value, time()+3600); /* expire in
1 hour */
setcookie("TestCookie", $value, time()
+3600, "/~rasmus/", ".example.com", 1);
?>
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / lamp
How to add a cookie,means what exactly...plz explain
| Is This Answer Correct ? | 1 Yes | 7 No |
Is php object oriented?
What is the use of @ in php?
Which MySQL function would you use to select a database?
What are the ways to include file in php?
What is the difference between print() and echo() in PHP?
Describe session in php.
Why is used in php?
With a heredoc syntax, do I get variable substitution inside the heredoc contents?
How to Define a Constant in PHP? Is $ symbol necessary?
how much can a 1yr experienced php programmer earn in india?
9 Answers TCS, Tops Technologies,
How can we define a variable accessible in functions of a php script?
What is the difference between the functions UNLINK and UNSET?