Hello:
I upgraded my php from 4.06 to 4.32 and when I ran my php I got some error messages.
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
After some research I found out I cannot use
session_register("login");
So the other solution was to turn globals on
I did and it worked.
So now I have read this
session_start(); //starts the sessions
//registers the variables
$_SESSION['var1'] = $_POST['var1'];
$_SESSION['var2'] = $_POST['var2'];
$_SESSION['var3'] = $_POST['var3'];
And want to use instead of session_register this $SESSION['var1'] = $POST['var1'];
So can anyone help me code this into the one I want to learn
<?
session_start();
session_register("SESSION");
if (! isset($SESSION)) {
$SESSION["count"] = 0;
echo "<li>Counter initialized, please reload this page to see it increment";
} else {
echo "<li>Waking up session $PHPSESSID";
$SESSION["count"]++;
}
echo "<li>The counter is now $SESSION[count] ";
?>
Thank in advance for anyone who helps.