how to check if field is empty in php code example Example: php if input is empty $a = empty($a) ? "Default value" : $a;