电子邮件脚本中出现意外的T_BOOLEAN_OR

时间:2011-06-27 23:04:49

标签: php html-form-post

我写了一个脚本,将联系表单的内容(名字,姓氏和电子邮件地址)发送给网站所有者。但是,当我按下表单上的“提交”按钮时出现错误:

Unexpected T_BOOLEAN_OR 

给出。以下是引用行号附近的代码片段:

function died($error) {  

echo "We are very sorry, but there were error(s) found with the form you submitted. ";   
echo "These errors appear below.<br /><br />";         
echo $error."<br /><br />";         
echo "Please go back and fix these errors.<br /><br />";        
die();     }           
// validation expected data exists    
if(!isset($_POST['first_name']) ||         
!isset($_POST['last_name']) ||        
!isset($_POST['email'])) || {    
died('We are sorry, but there appears to be a problem with the form you submitted.'); 
}           

非常感谢你的帮助:)

1 个答案:

答案 0 :(得分:4)

!isset($_POST['email'])) || {     <-- there's your problem