Form with POST return null |
Hi ,
I have a form with methop post it send the data from the form when put input, but when I do the $request->getPost('idiomas') it returns a null. I have tried with method get and it works but I need to do it in post. This what the headers infow show me ![]() This is how I create the route PHP Code: $routes->post('{locale}/app/admin/edit', 'Editor::edit', ['namespace' => 'App\Controllers\Appmudet\Admin']); And this is the form in html Code: <form action="/es/app/admin/edit" method="post"> This is the edit function PHP Code: public function edit(){
Did you try using a matched route?
PHP Code: $routes->match(['get', 'post'], '{locale}/app/admin/edit', 'Editor::edit', ['namespace' => 'App\Controllers\Appmudet\Admin']); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
https://codeigniter4.github.io/CodeIgnit...aceholders
! Note: {locale} cannot be used as a placeholder or other part of the route, as it is reserved for use in localization. (11-26-2018, 08:11 PM)NiteRaven Wrote: https://codeigniter4.github.io/CodeIgnit...aceholders I have used it in every route of my web and it works, I also tried to write the ulr without {locale}, and still dosen't work Quote:In Routes |
Welcome Guest, Not a member yet? Register Sign In |