doesn't work php session
<?php
session_start();
$_SESSION["name"] = "sami";
echo $_SESSION["name"];
?>
then;
<?php
session_start();
echo $_SESSION["name"];
?>
session write but session doesn't read.
chmod 777 /var/php5/sess*
but it doesn't work.
Did the comment formatter eat up the underscore in the first block? In other words, were you expecting $SESSION["name"] equal to $_SESSION["name"] ?
That's not the problem. I don't read session.
If you really had an underscore in both files, then you most likely tried to run the files at the command line, which you can't store the serialized values from your pages into a cookie. Only the web browser provides that, unless there's some magic new php.ini variable I missed.
Let's clean this up a bit.
In file1.php, add this:
In file2.php