These check if variable isset or not
function is_set( & $variable ) { if ( isset( $variable ) and ! is_null( $variable ) ) return true; else return false; }
if(!empty($_POST[myField])) { //Do my PHP code }
null
if (isset($var) && ($var === true)) { ... } array_key_exists('v', $GLOBALS)
isset()
isset — Determine if a variable is set and is not NULL
In other words, it returns true only when the variable is not null.
empty()
empty — Determine whether a variable is empty
In other words, it will return true if the variable is an empty string, false, array(), NULL, “0?, 0, and an unset variable.
is_null()
https://www.virendrachandak.com/techtalk/php-isset-vs-empty-vs-is_null/