我無法將表單提交頁面重定向到php。當我點擊提交時,它顯示我的PHP頁面,我正在尋找一個代碼,表單可以保存在一個特定的位置點擊subit用戶需要獲得後&謝謝消息&郵件應該得到發送給我本身無法將表單提交頁面重定向到php
我的代碼如下:
HTML
<html>
<title>
Test
</title>
<body>
<form method="post" action="test2.php"> onsubmit="return"
<center>
<font color="FFFFFF">From: <br><input name="email"type="text"></font>
</center>
<br>
<center>
<font color="FFFFFF">SSL Request:<br><textarea name="message" rows="3" cols="30"></textarea></font>
</center>
<br>
<center>
<input type="submit" value="Submit Request!">
</center>
</form>
<br>
This is test form
</body>
</html>
PHP:
<?PHP
$email = $_POST["emailaddress"];
$to = "[email protected]";
$subject = "New Email Address for Mailing List";
$headers = "From: $email\n";
$message = "A visitor to your site has sent the following email address to be added to your mailing list.\n
Email Address: $email";
$user = "$email";
$usersubject = "Thank You";
$userheaders = "From: [email protected]\n";
$usermessage = "Thank you for subscribing to our mailing list.";
mail($to,$subject,$message,$headers);
mail($user,$usersubject,$usermessage,$userheaders);
?>
01:35:53 AM [Apache] \t錯誤:Apache意外關機。 01:35:53 AM [Apache] \t這可能是由於端口被阻塞,缺少依賴關係,[Apache] \t不正確的特權,崩潰或其他方法關閉造成的。 上午01時35分53秒[阿帕奇] \t按日誌按鈕來查看錯誤日誌和檢查 上午01時35分53秒[阿帕奇] \t Windows事件查看器的更多線索 上午01時35分53秒[阿帕奇] \t如果您需要更多幫助,請在論壇上覆制併發布 01:35:53 AM [Apache] \t整個日誌窗口 – user3413774
以下是通過XAMPP啓動Apache服務時的錯誤 – user3413774
旁註:您的代碼似乎已損壞'