I'm doing a project and using PHP. There is signup.php page with form and it is sending "GET" instead of "POST". Even after hours of debugging, I could not come up with anything, I found a similar question but that seems to be of no help in my case. I have similar login.php page with almost same code and that works fine, I don't know what wrong I'm doing.
<form name="signUpForm" id="signUpForm" action="signup.php" method="post">
//form elements
<button type="submit" value="Submit">Submit</button>
</form>
Following the question mentioned, I tried to change it to
<button type="submit" value="Submit" formmethod="POST" formaction="signup.php" >Submit</button>
But this also gives the same result.
echo $_SERVER["REQUEST_METHOD"];
Above statement prints "GET" in PHP.
I would like to know what I'm missing, I know similar questions exist but I checked them before putting the question.