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
Why use static methods php?
Do you know what does mvc stand for and what does each component do?
Tell me how to strip whitespace (or other characters) from the beginning and end of a string?
How to find the position of the first occurrence of a substring in a string?
Tell me is it possible to protect special characters in a query string?
How to create a mysql connection in php?
How to retrieve values out of an array?
What is $_ files in php?
Does php need html?
How can we display the output directly to the browser?
Which is better php or nodejs?
What distinguishes php from something like client side java script?
In how many ways we can retrieve the data in the result set of mysql using php?
What is meant by public, private, protected, static and final scopes?
How to create an array in php?