Files
freeCodeCamp/mock-guide/english/php/forms/checking-required-inputs/index.md
Joe Erickson 0890dda962 Add content for PHP strings (#27489)
* Add content for PHP strings

* fix: resolved conflict
2019-02-28 16:37:12 -08:00

487 B

title
title
Checking Required Inputs

Checking Required Inputs

PHP has a few functions to check if the required inputs have been met. Those functions are isset, empty, and is_numeric.

Checking form to make sure its set

The isset checks to see if the field has been set and isn't null. Example:

$firstName = $_GET['firstName']

if(isset($firstName)){
  echo "firstName field is set". "<br>";
}
else{
  echo "The field is not set."."<br>";
}