Здравейте,
имам следният код:
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
set_error_handler("var_dump");
if(isset($_POST['submit'])){
$to = "markov_ood@abv.bg"; // this is your Email address
$from = $_POST['email']; // this is the sender's Email address
$name = $_POST['name'];
$subject = $_POST['subject'];
$message = $name . " wrote the following:" . "\n\n" . $_POST['message'];
$headers = "From:" . $from . "\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$header .= "X-Priority: 1\r\n";
$status = mail($to, $subject, $message, $headers);
if($status)
{
echo "Mail Sent. Thank you " . $name . ", we will contact you shortly.";
}
else
{
echo "Something went wrong, Please try again!";
}
}
?>
когато си стартирам сайта през Visual Studio 2015 и попълня формата която се изпраща на този код получавам: виж прикачния screenshot
HTTP Error 405.0 - Method Not Allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.
Някой има ли идея защо е това.....