cvs: php-gtk-web /manual set-magic-cookie.php

From: Date: Thu, 09 Aug 2001 17:05:25 +0000
Subject: cvs: php-gtk-web /manual set-magic-cookie.php
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2672@lists.php.net to get a copy of this message
cmv Thu Aug 9 13:05:25 2001 EDT Added files: /php-gtk-web/manual set-magic-cookie.php Log: Index: php-gtk-web/manual/set-magic-cookie.php +++ php-gtk-web/manual/set-magic-cookie.php <? commonHeader('Magic Cookie'); echo '<h1>Magic Cookie</h1>'; if (isset($user) && isset($pass)) { $MAGIC_COOKIE = base64_encode("$user:$pass"); # we set a cookie good for five years SetCookie("MAGIC_COOKIE", base64_encode("$user:$pass"), time()+157248000); echo "<P><b>Cookie set</b>.</P>"; } if (isset($MAGIC_COOKIE)) { list($user,$pass) = explode(":", base64_decode($MAGIC_COOKIE)); } ?> <form action="<?echo $PHP_SELF;?>" method="POST"> User: <input type=text name=user value="<?echo $user;?>"> <br> Pass: <input type=password name=pass value="<?echo $pass;?>"> <br> <input type="submit"> </form> <? commonFooter(); ?>

« previous php.gtk (#2672) next »