using session to make a calculator
Posted: Tue Aug 01, 2006 8:27 pm
okay from a recent post of mine i made a session variable, now using these variables i plan to do calculations, by doing that i first call the session to a regular variable (simply because i made the calculation using regular variables)
then that variable is used later in program as a number for a calculation, something like this
( i realise that is probably the long way of doing something but im learning)
now after getting that $taloan variable i run an if statement on it (something like:)
(note there are some variables i did not include above for relevance and legnth of post)
when i process page i get this error:
I believe i have confused myself with my first script and hopefully the above post is understandable
Code: Select all
$aloan1 = $_SESSION['aloan1'];Code: Select all
$taloan = ($aloan1 + $aloan2 + $aloan3 + $aloan4 + $aloan5 + $aloan6 + $aloan7 + $aloan8 + $aloan9 + $aloan10);now after getting that $taloan variable i run an if statement on it (something like:)
Code: Select all
if ($under10k == "yes" and $vestbal <= 10000)
{
$fcalc1 = ($vestbal - $taloan - $tdloan - $taint);
}when i process page i get this error:
now after looking at this register_globals I assume mine is turned off because im not getting a result, now does this mean that i cannot use these sessions variables to send data for calculations?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
I believe i have confused myself with my first script and hopefully the above post is understandable