Page 1 of 1
session_register() problem
Posted: Mon Jun 13, 2005 3:27 am
by milleusi
a need a code with session_register("var_name"); , it creates a file, but the file is 0k. Where is the problem, Why I can't get the var_name. "var_name" is the name of an input_text into a previous POST form.
thx...
Posted: Mon Jun 13, 2005 3:42 am
by malcolmboston
Code: Select all
session_register("var_name")
$_SESSION['var_name'] = $_POST['var_name'];
Posted: Mon Jun 13, 2005 4:42 am
by shiznatix
you don't need to user session_register(); just do
Code: Select all
$_SESSION['thing'] = $_POST['thing'];
or somthing similar
Posted: Mon Jun 13, 2005 4:52 am
by malcolmboston
exactly what i thought, i dont bother with session_register but have worked with sessions alot
Posted: Mon Jun 13, 2005 5:52 am
by phpScott
then on the next page remeber to use
Posted: Mon Jun 13, 2005 6:40 am
by Chris Corbyn
session_register() is deprecated (I think that's right). All you need to do now with PHP4+ is to use session_start() on any page you wish to play with sessions on and then go ahead and treat the $_SESSION[] arrya like any other

Posted: Mon Jun 13, 2005 10:18 am
by milleusi
I have descovered that is OK, for me, only with session_register("var_name") , but needs register_globals=On in PHP.INI
manny thx for all