I am having the strangest problem and I don’t know how to solve it. My form has as its first line:
<form action="index.php" method="POST">
but when I echo the $_SERVER['REQUEST_METHOD'] it echoes “GET”. I am using CodeIgniter so I don’t know if the problem is related to that. I thought it might be the form helper in CI but I wrote my form all in straight HTML and I still have the problem. The funny thing is if I copy the form into a local MAMP installation and run it, I get “POST”.
I feel like I am back to basics and am missing something obvious. Can someone help me please? Thanks.
Sounds like CodeIgniter is running your post through some sort of cleanup process and as a results it is missing the actual method. With most php MVC frameworks, your are not supposed to access your form elements through $_POST and $_GET. They have their own wrappers to access these elements for security and cleanups…