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

Posted by jkimball4 on 10/23/05 23:46

check your php.ini settings for sessions. if all seems to be okay then
make sure you are initializing sessions at the start of your php
scripts. like...session_start() or equivilent function. also check
how your sessions are being saved (on the server, cookies). if
cookies, check browser settings to make sure you are allowing cookies
to be saved on your machine.

typingcat@gmail.com wrote:
> 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

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