You are here: session data not recorded « PHP « IT news, forums, messages
session data not recorded

Posted by "Alessandro Rosa" on 10/21/12 11:21

I have a problem to record session data and I would you
help me. I suppose there's something I missed in the general
configurations during the last install, but I can't realize it.

I arranged a couple of simple files handling sessions, to show you my
problem.

I have a file index.php :
---------------------------------------------------------------------------
<?php session_start();

$_SESSION['user'] = "User";
$_SESSION['psw'] = "Psw";

?>

<a href="page2.php">Go!</a>
---------------------------------------------------------------------------

and then the file page2.php :

---------------------------------------------------------------------------
<?php session_start();

echo $_SESSION['user'];
echo "<br/>";
echo $_SESSION['psw'];

?>
---------------------------------------------------------------------------

But when page2.php is loaded, then a blank page is displayed.

What's wrong with this?
Thanks in advance.

Alessandro

 

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

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