Hello, I'm having a problem getting sessions to work with
register_globals=off.  The following 2 files work fine if reg_globals=on but
not when off.  When I look at the session file it reads like this:

!varA|!varB|

and not like it should:

varA|s:4:"funk";varB|s:4:"that";


//-----------------------------sess01.php

<?php
session_start();
session_register('varA');
session_register('varB');

?>

<form action="sess02.php">
first name:<input type="text" name="varA">
<br>
last name:<input type="text" name="varB">
<input type="submit" value="send">
</form>


//----------------------------sess02.php

<?php

session_start();
print("$varA $varB");

?>

What do I have to do to make this work with register_globals off?  Thank you
very much for help.  (If I get some time/answers I think I'm gonna design a
page that shows sample scripts that work with reg_globals=on and their
equivalents with reg_globals=off; this might be beneficial for some
newbies--such as myself.  If anybody would like to contribute, please email
me and you'll be duly credited if such a project comes to fruition. Thanx!)

--ahmad.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to