Don't mean to be repetitive - Session Variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I can't seem to figure this out.
Right now I'm still trying to get the multi page form
down.
For the facts, running php 4.3.8, apache 1.3.x
Register Globals are enabled

So I'm starting the pages with:
<?php
session_start();
?>

Now since this is a form, the user creates the value
for the variable, so within the form:

<input name="myname" type="text" id="myname"
value="<?php echo $_SESSION['myname']; ?>">

Question 1: is this enough to register the session
variable ?

If I send this form action post to a page where I
have:
<?php
session_start();
?.
..............
<?php
echo "\$myname = ".$myname."<br/>";
?>

The variable print out fine.
BUT - if I add another page between first and
printout,
echo "\$myname = ".$myname."<br/>"; - returns nothing

The 2nd page is another page in the form.  So 2nd page
variables will print out on the echoing page, but
again if I put a page between 2nd and 3rd , the 2nd's
are lost.

Now I've printed out the session.id so I see the
session is alive and id's match.  I've also checked
(forget the funtion) to see if $myname is a registered
session value and it returns 1 (true), so what gives ?

Thank you
Stuart

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux