I have searched the all questions with similar title, no solution for me yet.
I have a website running on apache2. I need to submit sensitive information through a form and I need to use POST method. Instead of POST, it sends GET request.
<form action="/add_user.php" method='POST'> Enter Username: <input type="email" name="email" required="required" /> <br/> Enter password: <input type="password" name="password" required="required" /> <br/> <input type="submit" value="submit"/> </form>
<?php $email=$_POST['email']; $password=$_POST['password']; //do stuff ?>
I have opened Network monitor in Firefox, and the method is confirmed as GET. I have tried to even make it PUT instead of POST, still it sends GET. Also,
$password get the values if I change them to
$_GET instead of
Any help would be appreciated.
One way to solve this is to reinforce your intentions by expliciting
formmethod="post", like this: