Click here to Skip to main content
15,920,801 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello guys, I am newbie in PHP. I have a problem I want to make a php function that will check the number if it is less than 75. I made a PHP function but I am not sure if this is correct. This is my old code an I want to simplify it.
if($_POST[grade] < 75)
{
echo 'Invalid grade';
}
elseif($_POST['grade2'] < 75)
{
echo'invalid grade';
}
Here is my current php function code:
function numeric($string)
{
return ....... i dont know the next
}
thanks in advance guys
Posted

1 solution

Learn to do it correctly:
1. PHP Functions[^]
2. PHP 5 Form Handling[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900