note 106975 deleted from function.setcookie by tularis

From: Date: Thu, 22 Dec 2011 20:46:38 +0000
Subject: note 106975 deleted from function.setcookie by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185226@lists.php.net to get a copy of this message
Note Submitter: h0mayun at yahoo dot com Reason: useless ---- Cool Example too set background color for user <?php if (isset($_COOKIE["bg"])) { echo '<div style="background-color:'.$_COOKIE["bg"].'">WORKED</div>'; echo 'background-color has been set to: <font color="'.$_COOKIE["bg"].'">'.$_COOKIE["bg"].'</font>'; }else { setcookie("bg", $_POST['bgcolor'], time()+100); ?> background-color is not set <br /> Choose it: <form method="post"> <select name="bgcolor"> <option value="red">red</option> <option value="blue">blue</option> <option value="green">green</option> <option value="yellow">yellow</option> </select> <input type="submit" /> </form> <?php } ?>

« previous php.notes (#185226) next »