How to add and subtract to integer using variable?
Posted: Sun Feb 13, 2011 5:53 pm
Hi,
I'm trying to do some simple math with user input but I can't seem to get it to work right.
I confirmed the browser excepts the values and returns the echo statement on $orglong
but when I applied the $minlong and maxlong values, this is the error i get.
Parse error: syntax error, unexpected T_ECHO in /xxxxxxxxx/xml_math.php on line 11
I would appreciate if you can give me some pointers or direct me to right place for me to research this topic.
I'm trying to do some simple math with user input but I can't seem to get it to work right.
Code: Select all
$orglong=htmlspecialchars($_GET[long]);
echo $orglong." ".$orglat;
$minlong=$orglong-500;
$maxlong=$orglong+500
echo $minlong." ".$maxlong;but when I applied the $minlong and maxlong values, this is the error i get.
Parse error: syntax error, unexpected T_ECHO in /xxxxxxxxx/xml_math.php on line 11
I would appreciate if you can give me some pointers or direct me to right place for me to research this topic.