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 set session.gc_maxlifetime properly?
How do you sort an array in php?
What is a lambda function in php?
Differentiate between require and include?
Tell me how is it possible to propagate a session id?
Is laravel an oop?
Is php outdated 2019?
How to send a cookie to the browser?
How to convert a string to uppercase in php?
Tell me how can I display text with a php script?
What is the different between count() and sizeof() in php?
What is session in PHP. How to remove data from a session?
What does the scope of variables mean?
What are the ways to include file in php?
Describe the security vulnerability of PHP?