这是我的代码。我对此非常陌生,不到 2 周,我知道这里某处存在语法错误,但它一直告诉我 T_variable 在第 12 行是意外的。它匹配“...input type="text" name=" firstname" value="First Name...\" 信息所以有人可以帮忙吗?Noob 需要帮助!只是一点点...?你能告诉我的任何事情都会非常感激。
<?
$correct = true;
if ($_GET["name"] == "")
$correct = false;
if (preg_match("/^.+@\w+\.\w{2,4}$/", $_GET["email"]))
$correct = false;
$to = "sample@domain.com";
$subject = "Application request";
$message = "A new request has come in!;\n\n"
$message .= $_GET["firstname"].;
$message .= $_GET["lastname"].;
$message .= $_GET["email"]."\n";
$message .= $_GET["phone"]."\n";
$message .= $_GET["dropdown"]."\n";
$message .= $_GET["address"]."\n";
$message .= $_GET["dropdown2"]."\n";
$message .= $_GET["textarea"]."\n";
(mail($to, $subject, $message);
?>
<body>
<? if ($correct): ?>
Thank you for applying. We will get back to you shortly.<br>
<? if else: ?>
Please complete the form.
</ end if ?>
</body>