POST request converted to GET


  • | 194 points

    I have a simple html form using POST request, however when recieving the data on the action file, my POST request doesn't exist.
    When i check the request methode using $_SERVER['REQUEST_METHOD'] it returns a 'GET'.
    So for some reason my POST gets rewritten as GET (i can also see the data sent in the URL).
    ---------------------------------------------------------------------------------------

    Here is the html form :

    0_1591975849625_Capture d’écran (191).png

    And here is the relevant part of the action file (add.php) :

    Notice how i'm using '$_GET['submit'] to collect my data, and it actualy works even though i used a POST request. (when i use $_POST['submit'] the isset($_POST['submit'] returns false obviously)

    0_1591976489720_Capture d’écran (193).png

    Thank you for your time.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.