$number1 = $_POST['zombie'];
if ($number1 > 0){
echo "greater than 0";
}
Now my script just says when the $_POST is -1 that it still is greater than 0. Is there some code that checks for values under 0?
Try #2:
$number1 = $_POST['number'];
if ($number1 > 0 && !($number1 < 0){
echo "greater than 0";
}
Still doesn't work...
echo gettype($number1) returns: NULL
So i did the "print_r($_POST)"
and it returns:
Array
(
[zombie] => -1
[droid] => 0
[alien] => 0
[rpc] => 0
)
my form:
<form method="post" action="index.php">
<input type="number" class="form-control" value="0" name="zombie"> <br />
<input type="number" class="form-control" value="0" name="droid"> <br />
<input type="number" class="form-control" value="0" name="alien"> <br />
<input type="number" class="form-control" value="0" name="rpc"> <br />
</form