Posted by typingcat on 10/22/05 13:08
Hello. I started writing PHP today.
I added the following code at a php page.
<?php
if($_SESSION["dbpwd"]=="")
{
print("EMPTY!");
$_SESSION["dbpwd"]="TEST";
print(" SET TO ".$_SESSION["dbpwd"]);
}
else
{
print($_SESSION["dbpwd"]);
}
?>
I thought if I refreshed the page, then dbpwd would set to "TEST" and
"TEST" would be displayed. But it didn't work. What's wrong? I'd like
to keep some variables that only are good for the sessioin.
Navigation:
[Reply to this message]
|