Welcome Guest, Not a member yet? Register   Sign In
Form submission not picking up URL route
#1

Hello ,

I have created a route for my admin sign in page as described below : 

Code:
$routes->get('/control_panel/request_access', "Admin_portal\Access_control::grant_access");

From the above you can see that i have a folder "Admin_portal" in my controller folder where I have an "Access_control" controller.

When I visit the URL  http://localhost/site_root/public/control_panel/request_access  my page loads , however when I submit a form with the same URL as my action value , I get the error below :

404 - File Not Found

Controller or its method is not found: App\Controllers\Control_panel::request_access

Below is my Sign in page : 

Code:
<form action="http://localhost/bytepixels/public/control_panel/request_access" method="POST" >
               
                        <label for="username">Username</label>
                        <input type="text" class="form-control" name="bp_post_email" placeholder="Enter username">
              
                        <label for="userpassword">Password</label>
                        <input type="password" class="form-control" name="bp_post_password" placeholder="Enter password">
                
                            <button class="btn btn-primary w-md waves-effect waves-light" type="submit">Log In</button>
</form>



Any help will be appreciated.

P.S : Any suggestions for a CI4 book out there ? , the documentation isn't as helpful as the ones for CI 2 & 3, not a dig at the contributors , just seeking help.
Reply


Messages In This Thread
Form submission not picking up URL route - by ebuoe - 03-08-2020, 08:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB