Skip to content
Advertisement

Webpage contact form using PHP error: {“code”:“MethodNotAllowedError”,“message”:“POST is not allowed”}

So I have used the code:

JavaScript

and the php file linked is

JavaScript

The error when testing is: {“code”:”MethodNotAllowedError”,”message”:”POST is not allowed”}

What am I doing wrong?

Advertisement

Answer

There is no $phone variable defined yet you’re trying to use it. Also see this in relation to Adobe products: https://community.adobe.com/t5/dreamweaver/quot-code-quot-quot-methodnotallowederror-quot-quot-message-quot-quot-post-is-not-allowed-quot-php/td-p/8967727?page=1

Try this, just to be double paranoid:

JavaScript

mail.php :

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement