Please tell me what needs to be done, to avoid the message:
Parse error: syntax error, unexpected $end in /xxxx/xxxxxxx/public_html/contact- it/feedback.php on line xxx (the last line of feedback.php = ?>)
Thanks to all for any hint.
if(empty($data_start)) {
if(empty($data_end)) { 开发者_Go百科
if(empty($comment)) {
# all empty
echo "You have not specified any details to submit to us";
exit ;
?>
You are missing closing curly braces:
if(empty($data_start)) {
if(empty($data_end)) {
if(empty($comment)) {
# all empty
echo "You have not specified any details to submit to us";
exit();
}}}
You should re-factor your code like this:
if(empty($data_start) && empty($data_end) && empty($comment)){
exit("You have not specified any details to submit to us");
}
More Info:
- http://www.w3schools.com/PHP/php_operators.asp
精彩评论