我正在尝试在 PHP 中创建联系表单,提交时出现此错误:第 7 行 /home/aginther14/aginther14.interactivedesignlab.com/contact.php 中的 Parse error: syntax error, unexpected ')'
我是 PHP 新手,如何解决这个问题?谢谢。
<?php
$to = "gintherthegreat@gmail.com";
$subject = "AdamGinther.com Message";
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers, $email,) ;
if($sent)
header("Location: contactconfirmed.html");
else
{print "We encountered an error sending your mail"; }
?>
<form name="contact" action="contact.php" method="post" autocomplete="off">
Name: <input type="text" name="Usersname"><br><br>
E-Mail: <input type="text" name="email"><br><br>
Comment:<br> <textarea name="message"></textarea><br><br>
<input type="submit" value="Send Me a Message!" id="button">