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 do I use isdigit function?
What type of headers have to be added in the mail function to attach a file?
Tell me how is it possible to propagate a session id?
Explain what is the main difference between require() and require_once()?
Where is the submitted form data stored?
What is a query in a database?
Is php an oop?
does PHP support foreign key and Rollback?yes or not.if not then why. how will you done these concept in php?
1 Answers Avanigoradia, Primus Global,
How to download and install php for windows?
What is difference between print_r and echo in php?
What is the purpose of the following files having extensions 1) .frm 2) .myd 3) .myi? What do these files contain?
How to run a php script?