I am getting the error message: Parse error: syntax error, unexpected T_BOOLEAN_AND
on the follwing "if" statement:
if ($row['inputType']=='email') && (!intval($row['required']) {
$form_validator = Loader::helper('validation/strings');
if (!$form_validator->email(trim($_POST['Question'.$row['msqID']])))
{
$errors[$row['msqID']] = $row['question']." ".t("is empty or isn't an emailaddress");
$notCompleted=1;
}
if ((int)(intval($row['other']) / 2) == 1) {
// This is a special validated email question (with two actual fields)
if ($_POST['Question'.$row['msqID']] != $_POST['Question'.$row['msqID'].'_2'])
{
$errors[$row['msqID']] = $row['question']." ".t("doesn't match the confirmation");
$notCompleted=1;
}
}
}
The original statement worked, the only thing I changed was this:
if ($row['inputType']=='email') {
to this:
if ($row['inputType']=='email') && (!intval($row['required']) {
Any ideas as to what I did wrong? I am a newbe to php, so I am sure it is some sort of syntax error that I am not seeing.
Thanks in advance
www.GlobalNerds.com