I've just finished setting up AMP on a new MacOS El Capitan installation. I don't know why but every time I try to run a simple HTML form with some PHP processing I get a 404 error. I've tried it with the default MacOS document root, I've also tried with the user-level document root, and I've even installed MAMP as a last-resort move. In all these setups the result is always the same when I hit the submit button: 404.
<?php if(isset($_POST['submit'])) {
$name = $_POST['name'];
$post = $_POST['post'];
$link = $_POST['link'];
echo $name;
echo $post;
echo $link;
echo "all good";
}
?>
<form name="upload" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="post">
Name:<br>
<input type="text" name="name"><br>
Post:<br>
<input type="text" name="post"><br>
Link:<br>
<input type="text" name="link"><br>
<input type="submit" name="submit" value="Submit Form"><br>
</form>
The error is "The requested URL/< was not found on this server."
What am I missing??
Many thanks in advance for your help!