First Time User-Login page

Hello there hope all is well:blush:

Im am very new to using this but have been familiar with the framework for a few years. My issue is that Im trying to create a simple login page and dont know how to make it come to life. I see the components(login.ctp, various controllers) how do I melt those in with say basic html template? Do I say for instance take Bootstrap login module and link the login.ctp to it? Im just lost at how to link the pieces and make a complete puzzle.

Thank you:heartpulse:
mekaboo

Thank you for repsonse! I’m just trying to build a simple page where people can login to site…didnt know if I have to place login.ctp into an html file or it can be a standalone. Speaking of ctp files how do one load them localhost…never dealt with a ctp file before.

Still dpnt understand…say I take the login.ctp and add it as a src script in a Boostrap file…do I do this or add bootstrap as a src script in a login.ctp file?

I would reccomend read this https://book.cakephp.org/3.0/en/controllers/components/authentication.html

1 Like

Thank you so very much…I think I’ve read it but will look more into it!

I see what u saying Sir😊

Unfortunately when I do localhost/login.ctp my screen shows me the code…I don’t see an actual login page. I use Atom as my text editor and I’m working in an Ubuntu system…do I need to take out some of the code to make the page appear regular in my localhost? Btw thank you for all your help​:blush::heart:

You are not supposed to use localhost/login.ctp, it should be something like localhost/users/login.
.ctp file is used to render the controller action page

template/Users/login.ctp:
normal file with html form with login and password fields and other php code

when user press submit button it sends the data to the login action so you can identify the user

//UsersController:

login(){
    //code logic that verify request data from .ctp form
}
1 Like

I did what you said and things improved:blush:
Im using Apache2 so I cd then ran bin and cakephp came up!

Thank ya so very much :heartpulse:

Thank you so very much Sir this helps:heartpulse:

Thank you for the awesome advice…it means alot :blush::green_heart: