On Sep 11, 2014, at 2:11 PM, Gates, Jeff <GatesJ@xxxxxx> wrote: > I need to update my php code on an old site as my host is now using PHP > 5.4.30 and my old code is using session_register which is has been removed > from this version of PHP. I am a newbie so I hope you'll bear with me. > > First: the errors I'm getting: > > [11-Sep-2014 11:21:14 America/Denver] PHP Notice: Undefined variable: > PHPSESSID in /home7/outtacon/public_html/dichotomy/intro.php on line 12 > [11-Sep-2014 11:21:14 America/Denver] PHP Fatal error: Call to undefined > function session_register() in > /home7/outtacon/public_html/dichotomy/intro.php on line 14 > > > > > Second, here the code for lines 12 to 14: > > ####phpinfo(); > if (!$PHPSESSID) { > ##register variables > session_register("as_role"); > session_register("as_name"); > session_register("as_email"); > session_register("as_reenteremail"); > session_register("as_story"); > ##print("setting up session"); > } else if ((!$as_role) || (!$as_name) || (!$as_email) || > (!$as_reenteremail) || (!$as_story)) { > session_register("as_role"); > session_register("as_name"); > session_register("as_email"); > session_register("as_reenteremail"); > session_register("as_story"); > ##print("setting up session 2"); > } > > > > I am also getting some errors on other pages but they are similar. It's > the session_register. > > Is there a way to substitute session_register for something else easily? > (Wishful thinking.) > > Thanks, > > Jeff > Jeff: Try: $_SESSION['as_role'] = whatever; No need to register anything, just use it. Cheers, tedd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php