Welcome Guest, Not a member yet? Register   Sign In
form POST to same page, request method remains GET
#2

I think you need to remove the trailing slash on this line:
PHP Code:
<form action="/klanten/<?= esc($klant['slug']) ?>/" method="post"

Like this:
PHP Code:
<form action="/klanten/<?= esc($klant['slug']) ?>" method="post"

Because CI uses regex to match the routes and I think you won't get a match with a trailing slash.

The user guide gives this example:

Quote:
PHP Code:
$routes->add('product/(:segment)''Catalog::productLookup/$1'); 

will only match product/123 and generate 404 errors for other example.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
RE: form POST to same page, request method remains GET - by includebeer - 04-17-2021, 03:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB