I've upploade my php codes under the address http://george.freeoda.com, my problem is the calc link located on the http://george.freeoda.com/calc.php, this php files processess successfully on my server locally, what might be the problem?
my full php codes are:
<?php
$n1 = &$_POST['n1']; // textbo1 declaration
$n2 = &$_POST['n2']; // textbo2 declation
if (isset($_POST['Button'])) { // check if a button is clicked
if (isset($_POST['string'])) {
$selected_radio = $_POST['string'];
if(is_numeric($n1) && is_numeric($n2)) {
switch($selected_radio) {
// a function to count words used in a string enterd
case 'minus':
echo "<font color = 'red'>",$n1, "</font> - " ,"<font color = 'red'>",$n2, "</font> = ", $n1 - $n2;
break;
case 'devide':
echo "<font color = 'red'>",$n1, "</font> / ","<font color = 'red'>" ,$n2, "</font> = ", $n1 /$n2;
break;
case 'multiply' :
echo "<font color = 'red'>",$n1, "</font> * ","<font color = 'red'>" ,$n2, "</font> = ", $n1 * $n2;
break;
default:
echo "<font color = 'red'>",$n1, "</font> + ","<font color = 'red'>" ,$n2, "</font> = ", $n1 + $n2;
}
}
else
echo "<font color = 'red'>Enter only numbers</font><br>" ;
}
if(empty($n1) && empty($n2)) {
echo "<font color = 'red'>Fill in First number and Second number</font>";}
}
?>
or follow the link http://george.freeoda.com/calc.txt.
What's wrong with my codes guys?
can someone figure out the problem for me?