diff --git a/guide/english/php/forms/checking-required-inputs/index.md b/guide/english/php/forms/checking-required-inputs/index.md index 68033b6f4e..951b7f99c9 100644 --- a/guide/english/php/forms/checking-required-inputs/index.md +++ b/guide/english/php/forms/checking-required-inputs/index.md @@ -1,13 +1,21 @@ --- title: Checking Required Inputs --- + ## Checking Required Inputs -This is a stub. Help our community expand it. +PHP has a few functions to check if the required inputs have been met. Those functions are ```isset```, ```empty```, and ```is_numeric```. -This quick style guide will help ensure your pull request gets accepted. +### Checking form to make sure its set +The ```isset``` checks to see if the field has been set and isn't null. +Example: +```php +$firstName = $_GET['firstName'] - - -#### More Information: - +if(isset($firstName)){ + echo "firstName field is set". "
"; +} +else{ + echo "The field is not set."."
"; +} +```