I have created a plugin with a form to send a post request to a custom PHP file, but when I send the form, I get a 500 error.
To verify and ascertain that the error is not originating from my code I've created a simple HTML file with the same code and run a counter-test on it, to accessing through a GET request: I got no error (HTTP 500 error); I was able to access it successfully.
But: when I change the file extension from
.php, I get the same 500 error.
I have tried changing file permissions to 777.
Below is the HTML form of the plugin I'm developing (which gives me a 500 error):
<form action="http://example.com/wp-content/plugins/plugin-folder/form_processing.php" method="post"> <!-- form content here --> </form>
Here, content of another simple HTML file:
<html> <head> </head> <body> <!-- something --> </body> </html>
When I change the file extension from
.php, it gives 500 error resulting from the GET request and I can't seem to determine the cause.
How can I solve this problem?