can you show me how match routes dont work in this case> |
today i test matches routes in codeigniter 4.5.3 but it don't work, someone can show me?
routes PHP Code: $routes->match(['get','post'],'vnadmin/camera_category/addCate','\Modules\Admin\Cam\Controllers\CamController::addCate'); controller PHP Code: public function addCate(){ view PHP Code: <form class="form-horizontal" role="form" name ="form1" id="form1" method="post" action="<?php echo $Method; ?>" enctype="multipart/form-data" > this code can go to page addCate but it dont get post data
This code is wrong.
PHP Code: if($this->request->getMethod() == "post"){ See https://codeigniter.com/user_guide/insta...ethod-name Using is() might be better. https://codeigniter.com/user_guide/incom...st.html#is
Using constant Method::POST Method::GET
https://github.com/codeigniter4/CodeIgni...od.php#L46
thank you https://forum.codeigniter.com/member.php...&uid=52428 and https://forum.codeigniter.com/member.php...ile&uid=90
add is('post') work for me |
Welcome Guest, Not a member yet? Register Sign In |