[Solved] check if value is above 0 not working


Maybe you just wrong posting your data? Check what is in $_POST['number'].

echo $_POST['number'];

You can always check your whole $_POST array, maybe you just made a mistake in your variable name? If you want to do it:

echo "<pre>";
print_r($_POST);
echo "</pre>";

There is no input in your code with name="number"
You need something like that:

<input type="number" class="form-control" value="0" name="number"> <br />

14

solved check if value is above 0 not working