Reply to Re: help needed - passing values between two loads of the same page

Your name:

Reply:


Posted by Joseph S. on 09/21/05 20:12

Hi,
> How about placing it in the $_SESSION array? Start the session at the
> beginning of the page and store $s in $_SESSION['s']. Then pull it out
> on the second call. (Be sure to clear $_SESSION['s'] on first call to
> the page).

I did that, the value of $s is getting stored properly in
$_SESSION['s'], but in the second load of the page, $_SESSION['s'] is
not showing in the case '2' code.

Either script does not hav e access to $_SESSION or values held in
$_SESSION are removed. Does PHP give an invalid index error in the case
that I access $_SESSION['s'] and $_SESSION does not have an 's'
element?
I am asking this because, it is giving no such error, probably meaning
that the $_SESSION array has 's' but the value is getting cleaned.

also, in the case '2' code,
print_r($_SESSION);
outputs nothing at all!

Also, I have tried -
session_name("samplesession");
session_start();
in the case '1' code at the start.

But in the case '2' code,
a session_is_registered("samplesession"); gives a FALSE.

I have register_globals=On in my php.ini.


Any other function needs to be used?


Joseph S.

[Back to original 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

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