Brandon_R Posted July 30, 2009 Share Posted July 30, 2009 Hello fellow members of this forum. I need a validation from you guys. Check is a value, lets say $_POST['value'] is larger than 4 to return an error Please tell me how to accomplish that Thank You Brandon_R Link to comment https://forums.phpfreaks.com/topic/168110-check-if-a-value-is-larger-than-x/ Share on other sites More sharing options...
trq Posted July 30, 2009 Share Posted July 30, 2009 if ($_POST['value'] > 4) { // do whatever } Link to comment https://forums.phpfreaks.com/topic/168110-check-if-a-value-is-larger-than-x/#findComment-886647 Share on other sites More sharing options...
phpSensei Posted July 30, 2009 Share Posted July 30, 2009 if ($_POST['value'] > 4) { // do whatever } lol just for the post count <?php $num1 = (int)$_POST['value']; $num2 = 4; if($num1 > $num2){ print ("Hey, ".$num1." ISNOT bigger than ".$num2); } ?> Link to comment https://forums.phpfreaks.com/topic/168110-check-if-a-value-is-larger-than-x/#findComment-886680 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.