note 50241 deleted from function.session-register by philip

From: Date: Wed, 29 Mar 2006 06:24:44 +0000
Subject: note 50241 deleted from function.session-register by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-106917@lists.php.net to get a copy of this message
Note Submitter: erik«at»phpcastle«dot»com ---- Heya.... A way to check out the visitor has cookies enabled or a firewall or virusscanner blocks them... [file = cookie_check.php] <?php session_start (); //Check GET request if (isset ($_GET['cookie_check'])){ //Check session if (isset ($_SESSION['session_set'])){ //Display working message echo "working..."; exit; //Or redirect //header ("Location: cookie_working.php"); } else { //Display failure message echo "failure..."; exit; //Or redirect //header ("Location: cookie_fail.php"); } } session_register ("session_set"); $_SESSION['session_set'] = true; header ("Location: cookie_check.php?cookie_check=1"); ?> Hope this is usefull for someone :)

« previous php.notes (#106917) next »