-1

我的代码有问题。我正在通过 html / PHP 制作一个简单的“联系我们”。但我对这一切都很陌生,并且一步一步地学习它。所以这就是我来这里的原因。我收到此错误: Parse error: syntax error, unexpected '(' in D:\xampp3\xampp\htdocs\contact.php 在第 10 行,这是代码:

<i><?php
include 'core/init.php';
include 'includes/overall/header.php';
if (empty($_POST) === false) {

    $name     = $_POST ['name'];
    $email    = $_POST ['email'];
    $message  = $_POST ['message'];

    if (empty($name) === true || (empty( ($email) === true || (empty($message === true)  {
       $errors[] = 'Name, email and message are required!';
    } else {

}  
?></i>
4

1 回答 1

0

尝试这个:

<i><?php
include 'core/init.php';
include 'includes/overall/header.php';
if (empty($_POST) === false) {

    $name     = $_POST ['name'];
    $email    = $_POST ['email'];
    $message  = $_POST ['message'];

    if (empty($name) === true || empty($email) === true || empty($message) === true)  {
       $errors[] = 'Name, email and message are required!';
    } else {
    }
    // The else above is actually not needed thus you could remove it.

}  
?></i>
于 2013-06-23T11:23:14.917 回答