Hi,
I have a form.php file that calls from a functions.php file, the function validateForm. (This is just a test file which I will build on). Just about everything works except that the error messages do not appear. Would anyone have any idea why?
I've already tried the following:
Replace $message with $feedback .
Replace the message initialisation line with global $feedback;
Thanks for any help,
Giovanni
functions.php
<?php
function validateForm($BI_FName, $BI_LName, $BI_company) {
$message = "";
if ($BI_FName == "") {
$message .= 'First Name cannot be blank';
return false;
}
if (strlen($BI_LName) < 5) {
$message .= 'Last Name cannot be less than 5 characters!';
return false;
}
if (empty($BI_company)) {
$message .= 'You have not entered a company name. ';
return false;
}
}
?>