As I posted last week, I seem unable to have sessions persist.  I
have ruled out https as a problem, the following simple script,
installed as xxx.php will generate a new session number every time
the field is filled in and "Submit" is hit.

Note that I am not using cookies, the relevant session variables are:
   Session Support              enabled
   session.auto_start           On
   session.use_cookies          Off
   session.use_trans_sid        On

When run, the session file appears to contain stage=1 but never is being
read.

I suspect I'm missing something obvious, any pointers?

/\/\ \/\/

<?
if (!session_is_registered("stage")) {
   $_SESSION["stage"] = 0;
   $_POST['field'] = "";
   session_register("stage");
   }
?>
<html> <head><title>PHP Test page</title></head>
<body>
<?
  echo "Stage:"; echo $_SESSION["stage"];
  echo " SessionID: "; echo  session_id();
  $_SESSION["stage"] = 1;
?>
   <form method=post action="xxx.php">
      <input type=text maxlength=7 size=7 name=field value="<?echo $_POST['field']?>">
      <input type=submit value="Submit">
   </form>
<?
  echo "Stage:"; echo $_SESSION["stage"];
?>

</body> </html>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to