more cookie woes
| From: | Kurth Bemis | Date: | Tue, 05 Sep 2000 04:24:42 +0000 |
| Subject: | more cookie woes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15229@lists.php.net to get a copy of this message | ||
hey all
i want to retrieve only one cookie from an array.....the username....
source -
//if there exists a cookie..print a nice message
if (isset ($juneandstorm[username])) {
while (list ($name, $value) = each ($juneandstorm[username])) {
$user = $value;
}
}
print "<p><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">Welcome back $user</font></p>";
and then i get this error
Warning: Variable passed to each() is not an array or object in /www/juneandstorm/index.php on line 21
and line 21 is
while (list ($name, $value) = each ($juneandstorm[username])) {
help!
~kurth
Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer
kurth@usaexpress.net
http://www.usaexpress.net/kurth
ICQ - 6624050
Call Sign - N1TYW
PGP key available - http://www.usaexpress.net/kurth/pgp
Fight Weak Encryption! Donate your wasted CPU cycles to Distributed.net (http://www.distributed.net)