Hi am new in yii and I have read the tutorials but I cannot get the flow how yii mvc relate. e.g I have a login form. where the user inputs their username and password.(saved in …views/users/login.php).I have a controller logincontroller.php(saved in …controllers/logincontroller.php) in it the public function actionlogin. and the model loginform in the models folder.
Could someone please assist me in getting to know how this relate. i.e what happens when the user clicks the login button in the view.
You can investigate code of the example shipped with Yii.
Basically, user clicks submit, then the form data is sent via POST to its action url (to current url in case of empty action value).
This request is being processed by controller’s action (actionLogin in your case), that fills and validates the form model (LoginForm in your case) and then does something depending on validation result (logs user in and redirects or renders the form once again displaying validation errors).