unexpected T_BOOLEAN_OR on form to email

Hi,

I’m troubleshooting a problem with a form to email script, and the error returned is:

“Parse error: syntax error, unexpected T_BOOLEAN_OR in D:\Hosting\8167504\html\emailformdata2.php on line 19”

I’ve checked php.net for information about the isset variable function, and logical operators. None of the information there or in the first few comments was helpful up to this point. I have one question that I’m seeking to answer. Why is the || operator unexpected in this case? Each “isset” is prepended by an “!”. Do I need to get rid of that “!”? and/or do I need to change the “||” entries to "&&"s? Thank you for your time and consideration of this problem.

Sincerely,
presto482

maybe put the lines of code that are around line 19 on here so we can see them.

probably a ( in the wrong place

Ok. Thanks for replying. The necessary code is posted herein. I changed “||” to “&&” on line 19 going down the list of lines of “!isset”. The error changed from “unexpected T_BOOLEAN_OR…on line 19” to “…you entered does not appear to be valid” for the following fields from the html form. I checked the fields in the html code and none of the settings or rules there are broken by the data I input when testing the form (i.e., maxlength and input type). The php contains the following settings and rules for the html form fields, and which are the fields that returned errors:

"
$email_exp = ‘/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,4}$/’;
if(!preg_match($email_exp,$email_from)) {
$error_message .= ‘The Email Address you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$fname)) {
$error_message .= ‘The First Name you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$zipcode)) {
$error_message .= ‘The Zip Code you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$email_from)) {
$error_message .= ‘The Email you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$vemail)) {
$error_message .= ‘The Email (in the verify field) you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$phone)) {
$error_message .= ‘The Phone Number you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$cell)) {
$error_message .= ‘The Cell Number you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$fax)) {
$error_message .= ‘The Fax Number you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$timeframe)) {
$error_message .= ‘The Time Frame you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$quantity)) {
$error_message .= ‘The Quantity does not appear to be valid.
’;
}
if(!preg_match($string_exp,$specunits)) {
$error_message .= ‘The Specific Units you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$reqcompdate)) {
$error_message .= ‘The Requested Completion Date you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$baddress)) {
$error_message .= ‘The Billing Address you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$bcity)) {
$error_message .= ‘The Billing City you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$bstate)) {
$error_message .= ‘The Billing State you entered does not appear to be valid.
’;
}
if(!preg_match($string_exp,$bzipcode)) {
$error_message .= ‘The Billing Zip Code you entered does not appear to be valid.
’;
}
"

Thank you for your willingness to help.

Sponsor our Newsletter | Privacy Policy | Terms of Service