Reserved Words; possibly deprecated?
Posted: Sat Jun 21, 2008 10:36 am
Hi,
This is pretty simple, I think, and more to settle an annoyance than a real "problem" but also to be sure I'm not doing something stupid.
Rank newbie, XP Pro/SP2, Apache local and remote both, PHP 5.2.5 local and remote.
-- Is/Has "num" a/ever been reserved word? If it is/was, then I'm fine. If it's not/was never, then I'm confused by the error message that' bugged me for a couple of hours before I finally wised up!!
In:
"num" above causes this error message:
Setting "num" to anything else ('no', 'numb', 'nom', etc.) does not cause the error message to be displayed.
Both ... _42 and ..._warn are set to on (1) and I see I can just turn off the message, but that smacks of a bandaid solution. I'd rather know more WHAT the message actually means in this case. The only thing I can figure it is must have been a reserved word or something at one time. True? False?
More incclusive code, just for GPs; not really necessary I don't think:
Thanks for your time,
Twayne
This is pretty simple, I think, and more to settle an annoyance than a real "problem" but also to be sure I'm not doing something stupid.
Rank newbie, XP Pro/SP2, Apache local and remote both, PHP 5.2.5 local and remote.
-- Is/Has "num" a/ever been reserved word? If it is/was, then I'm fine. If it's not/was never, then I'm confused by the error message that' bugged me for a couple of hours before I finally wised up!!
In:
Code: Select all
<?php
...
$_SESSION['num']=$no;
... ?>
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
Setting "num" to anything else ('no', 'numb', 'nom', etc.) does not cause the error message to be displayed.
Both ... _42 and ..._warn are set to on (1) and I see I can just turn off the message, but that smacks of a bandaid solution. I'd rather know more WHAT the message actually means in this case. The only thing I can figure it is must have been a reserved word or something at one time. True? False?
More incclusive code, just for GPs; not really necessary I don't think:
Code: Select all
<?php
// nuentry.php
session_start();
$quantity = 3; // old quantity of items to buy
if (isset($_SESSION['count'])) { // sessions counting
$count = $_SESSION['count'];
} else {
$count = 0;
}
$count++;
$_SESSION['count'] = $count;
$_SESSION['n0']=$no;
echo "Page Displays is: " . $count . "<br>";
?>
...
Form code here
...
Twayne