You are here: A simple newbie question « PHP Programming Language « IT news, forums, messages
A simple newbie question

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация