form POST to same page, request method remains GET |
I'm trying to post a form to the current page and process it there. To this end I addes a matched route to Routes.php:
PHP Code: $routes->match(['get', 'post'], 'klanten/(:segment)', 'Klanten::bewerk/$1'); I do not have a route set up that overwrites this route. Here is the full routes list: PHP Code: $routes->match(['get', 'post'], 'soorten/(:segment)', 'Soorten::index/$1'); When I post the form somehow the request method keeps coming back as get instead of post... Here is my form HTML: Code: <form action="/klanten/<?= esc($klant['slug']) ?>/" method="post"> As you can see, I do have the forms method as post. The debug bar does show the route is there: Image doesn't work, here is the link: http://development.medicalcrossteam.nl/i...ns-get.png By now I'm ready to smash my head against the wall, because I can't figure out what is going on here. I'm hopinh you guys can help me and prevent me from doing that |
Messages In This Thread |
form POST to same page, request method remains GET - by BFlokstra - 04-17-2021, 08:40 AM
RE: form POST to same page, request method remains GET - by includebeer - 04-17-2021, 03:10 PM
RE: form POST to same page, request method remains GET - by BFlokstra - 04-17-2021, 03:24 PM
RE: form POST to same page, request method remains GET - by includebeer - 04-17-2021, 03:28 PM
RE: form POST to same page, request method remains GET - by BFlokstra - 04-17-2021, 03:46 PM
|