I have my HTML contact form and my PHP post. With my website Live... when submitting the form I'm lead to a "405 Not Allowed" page. I'm very new to PHP and I'm lost at this point.
Following some of the online tutorials... there is an index.php. I'm guessing this is where the page goes to when submit is clicked.
contact.html:
<form method="post" class="contact-form" action="contactform.php">
<div class="form_settings">
<p><span>Subject</span><input class="contact" type="text" name="subject" value="" /></p>
<p><span>Name</span><input class="contact" type="text" name="name" value="" /></p>
<p><span>Email Address</span><input class="contact" type="text" name="mail" value="" /></p>
<p><span>Message</span><textarea class="contact textarea" rows="8" cols="50" name="message"></textarea></p>
<div class="button">
<p style="padding-top: 15px"><span> </span><input class="submit" type="submit" name="submit" value="submit" /></p>
</div>
</div>
</form>
contactform.php:
if (isset($_POST['submit'])){
$name = $_POST['name'];
$subject = $_POST['subject'];
$mailFrom = $_POST['mail'];
$message = $_POST['message'];
$mailTo = "xxxxxxxx@yahoo.com";
$headers = "Form: ".$mailFrom;
$txt = "You have received an E-mail from ".$name.".
".$message;
mail($mailTo, $subject , $message, $headers);
header("Location: index.php?mailsend");
index.php
<?php
echo "Hello world!";
?>