I am new to aws and php. I am running into a problem trying to setup a basic send form on a static amazon s3 site.
Error 405 Method Not Allowed Code: MethodNotAllowed Message: The specified method is not allowed against this resource. Method: POST ResourceType: OBJECT RequestId: B41697D6C61AFFCE HostId: imaELAWJKISLaPfU1tAbhFaIPAgoRxoUsU7JMcc/x9MSS5SOrU6LiW8sVuS4jTw+d2SdWdbjHQ4=
PHP
<?php $name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "support@website.com";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
HTML
<form method="post" action="#">
<div class="fields">
<div class="field half">
<label for="name">Name</label>
<input type="text" name="name" id="name" />
</div>
<div class="field half">
<label for="email">Email</label>
<input type="text" name="email" id="email" />
</div>
<div class="field">
<label for="message">Message</label>
<textarea name="message" id="message" rows="5"></textarea>
</div>
</div>
<ul class="actions">
<li><a href="" class="button submit">Send Message</a></li>
</ul>
</form>
Can you point me in the right direction?