Can someone tell me why this is not working the way I think it should?
a. why is 'is_null()' not working
b. how can I use a boolean variable
Thanks for your help
$msg = '<font color="#FF0000">Please enter your: </font> <br> <br>';
$form_filled = 1;
if ( is_null($first_name)) {
$msg .= $rtn . '<font color="#FF0000">First name</font>';
$form_filled = 0;
}
if ( is_null($last_name)) {
$msg .= $rtn . '<font color="#FF0000">Last name</font> <br> <br>';
$form_filled = 0;
}
if ( is_null($message)){
$msg .= $rtn . '<font color="#FF0000">Message</font> <br> <br>';
$form_filled = 0;
}
if ($form_filled = 1) {
if (mail($to, $subject, $mesg))
$msg = '<font color="#FF0000">Thank You '. $first_name. ', your e-mail has been sent.</font> <br> <br>';
else
$msg = '<font color="#FF0000">Were sorry '. $first_name. ', but your e-mail was not sent. Please call us.';
}