Mobile app version of vmapp.org
Login or Join
Nimeshi995

: 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

@Nimeshi995

Posted in: #WebsiteDesign

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

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gretchen104

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme