HTTP-verb POST not allowed??
Hejsa,Jeg er ved at lave en hjemmeside med en contactform,
men når jeg trykker "send", får jeg blot denne besked:
405 - HTTP verb used to access this page is not allowed.
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
Php'en ser således ud:
<?php
if( isset($_POST["name"]) )
{
$name = $_POST["name"];
$firm = $_POST["firm"];
$email = $_POST["afsender"];
$phone = $_POST["phone"];
$message = $_POST["message"];
if( strlen($name) == 0 || strlen($email) == 0 || strlen($message) == 0 )
$error = true;
$headers = "From: ".$name." <".$email.">\r\n";
$body = "Besked fra hjemmeside:\n";
$body .= "Navn: ".$name."\n";
$body .= "Virksomhed: ".$firm."\n";
$body .= "E-mail: ".$email."\n";
$body .= "Telefon: ".$phone."\n\n";
$body .= $message;
if( strlen($_POST["email"]) == 0 && !isset($error) )
{
mail("xxxxxxxxxx@hotmail.com", $subject, $body, $headers);
}
}
?>
<?php if( isset($error) ): ?>
<p>Ikke alle felter var udfyldt!</p>
<?php else: ?>
<p>Tak for beskeden!</p>
<?php endif; ?>