: What Are Site-Wide Cookies? Please help me by telling what is site-wide cookies in PHP. This question while reading an article. Please help. I will grateful to you. Thanks
Please help me by telling what is site-wide cookies in PHP. This question while reading an article. Please help. I will grateful to you.
Thanks
More posts by @Nimeshi995
1 Comments
Sorted by latest first Latest Oldest Best
Site-wide cookies are cookies that are valid in the whole site (domain).
In order to achieve this, you would need to set the correct parameters in the PHP function setcookie().
For example:
setcookie("TestCookie", $value, time()+3600, "/", "example.co.uk");
This would be a site-wide cookie for the domain example.co.uk, and it would last 1 hr.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.