10-14-2009, 12:08 AM
|
#2 (permalink)
|
|
The Addict
Join Date: May 2009
Posts: 287
Thanks: 5
|
Correct me if I'm wrong but not all browses seem to send a undefined value for blank form fields, some tend to send '' (aka, nothing [blank string]).
PHP Code:
function is_empty($value){ if ($value === '' || empty($value)){ return false; } return true; }
if (is_empty($firstname) || is_empty($lastname) || is_empty($emailaddress)) { $message = "Please fill in all fields!"; } else {
|
|
|
|