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 |
Tell me what is the difference between get and post?
Is there an easy way to delete an element from a php array?
How to compare two strings with comparison operators in php?
Explain the difference b/w static and dynamic websites?
What is the functionality of the function strstr and stristr?
What is interface? Why it is used?
Which is better get or post method?
How do I expire a php session after 30 minutes?
Is ruby on rails php?
Here in this site i could not find the details for php ZEND certifications or i think u did not post any ? so i need the information about the php certification how to prepare and some of the mock exams?
How does the identity operator === compare two values?
Why constructor is not overridden?