このお問い合わせフォームを作成しました。FirefoxとChromeで完全に機能しますが、Internet Explorerではテキストを入力できません(フォームフィールドをクリックしても何も起こりません)。送信ボタンは機能しますが、テキストを入力できないため、空白のメッセージのみを送信します。また、送信を押すと、Firefoxページでmail.phpを開こうとしますが、PCでローカルにテストしているだけですが、これが問題になる可能性がありますか?
PHPはこれです:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$formcontent="This message has been generated from the Contact page \n Name: $name \n Phone: $phone \n Email: $email \n Message: $message";
$recipient = "myemail@myemail.co.uk";
$subject = "Enquiry From contact page";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
header('Location: ../contact2.html');
?>
HTMLは次のとおりです。
<form id="form1" action="PHP/mail.php" method="post">
<label>Name <span class="small">Add your name</span></label>
<input type="text" name="name"><br>
<label>Email <span class="small">Enter a Valid Email</span></label>
<input type="text" name="email"><br>
<label>Phone <span class="small">Add a Phone Number</span></label>
<input type="text" name="phone"><br>
<br>
<br>
<label>Message <span class="small">Type Your Message</span></label>
<textarea name="message" rows="6" cols="25">
</textarea><br>
<button type="submit" value="Send" style="margin-top:15px;">Submit</button>
<div class="spacer"></div>
</form>