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 |
How can we check the value of a given variable is a number?
What is isset and unset in php?
How to make a class in php?
What is the function of mysql_real_escape_string in php?
What is the use of explode() function?
How can you get web browser’s details using PHP?
What is a class in php programing?
What is overloading in php?
What are php loops?
How many functions are there in php?
What is uri routing?
How to stop the execution of php script?