Form action not working |
This is the code. When you press the submit button, nothing happens
view: Code: <form method="post" action="<?php echo subSECURE;?>/index.php/User/add" autocomplete="off" enctype="multipart/form-data"> Routes: PHP Code: $routes->post('User/add/(:segment)', 'User::add/$1',['filter' => 'auth']); Controllers: PHP Code: class User extends BaseController
What is subSECURE?
You're missing a route for /User/add. It's not the same thing as /User/add/(:segment).
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
I tried with User/add and it still doesn't work
maybe I should put some kind of helper? pressing the button does not execute the form at all subSECURE is = secure.domain.com in routers.php PHP Code: function whichSubRoute()
(05-29-2021, 01:00 PM)Secux Wrote: pressing the button does not execute the form at all If the submit button doesn't submit the form you must have syntax error in your html or you have some javascript code that intercept the event. Look in your browser console for any error message.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Welcome Guest, Not a member yet? Register Sign In |