{"code":"MethodNotAllowedError","message":"POST is not allowed"} - PHP Submit Form
Hello,
I am learning to code with PHP and during my test I used the following code:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
<body>
<?php
if (isset($_POST['Submit'])) {
// process form
printf('User: %s
Pass: %s
Status: %s
Comments: %s',
$_POST['User'],
$_POST['Pass'],
$_POST['Status'],
$_POST['Comments']);
}
?>
<form method="post" action="">
User: <input type="text" name="User"><br>
Pass: <input type="password" name="Pass"><br>
Status:
<input type="radio" name="status">Single
<input type="radio" name="status">Married
<input type="radio" name="status">Divorced
<input type="radio" name="status">Widowed<br>
Comments:<textarea name="comments"></textarea><br>
Submit:<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
Dreamweaver didn't report any problems and when I tried to submit my form (localhost) it gave back the error on the title.
Can anyone help me figure this out?
