Answer Posted / 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 |
Post New Answer View All Answers
How to define a user function?
How long will it take to learn php?
What is the use of trim in php?
What are the options to transfer session ids?
What is cookie and session in php?
Do you know what is the use of the function 'imagetypes()'?
How many types of errors in php?
What is faster in php?
What are advantages of .htaccess?
What can php do?
Explain the difference between unlink() and unset()?
How long does a session last in php?
What is $_session in php?
What is a controller in php?
Tell me in php, objects are they passed by value or by reference?