Jump to content

Proper Way to Check If Cookies Exist?


elg2001

Recommended Posts

Is isset($_COOKIE['cookie_name']) the best way to check if a certain cookie named [i]cookie_name[/i] exists?

Previously, I was using if(strlen($_COOKIE['cookie_name']) > 0) but that generates errors.

Basically, what is the best way to check for the existence of a cookie? isset() or otherwise?
Link to comment
https://forums.phpfreaks.com/topic/9960-proper-way-to-check-if-cookies-exist/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.