title
PHP CodeIgniter Tutorial 3 - Login System

description
Please Rate, Comment and Subscribe.

detail
{'title': 'PHP CodeIgniter Tutorial 3 - Login System', 'heatmap': [{'end': 1072.339, 'start': 1048.465, 'weight': 0.789}, {'end': 1145.554, 'start': 1116.84, 'weight': 0.823}, {'end': 1458.693, 'start': 1423.906, 'weight': 0.904}], 'summary': 'Learn to create a login system in codeigniter by downloading the framework, setting up the project in netbeans, creating a database with dummy records, developing login views, forms, models, and controllers, and implementing form validation, error handling, and a callback function for user verification.', 'chapters': [{'end': 129.348, 'segs': [{'end': 22.995, 'src': 'embed', 'start': 0.089, 'weight': 0, 'content': [{'end': 7.819, 'text': "hello and welcome to the third code igniter tutorial, and in this tutorial i'll show you how you can create login system in code igniter.", 'start': 0.089, 'duration': 7.73}, {'end': 14.147, 'text': 'so first of all, what you guys need to do is go to codeigniter.com website and download the code igniter framework.', 'start': 7.819, 'duration': 6.328}, {'end': 22.995, 'text': 'so after you download, go to the place wherever you downloaded your file and it will be a zip folder, the file you need to unzip it.', 'start': 14.147, 'duration': 8.848}], 'summary': 'This tutorial demonstrates creating a login system in codeigniter. it directs users to download the framework from codeigniter.com and unzip the downloaded file.', 'duration': 22.906, 'max_score': 0.089, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U89.jpg'}, {'end': 129.348, 'src': 'embed', 'start': 78.527, 'weight': 1, 'content': [{'end': 87.793, 'text': 'next, and now i will browse that login folder, which is within htdocs, and open it and next and click finish.', 'start': 78.527, 'duration': 9.266}, {'end': 90.495, 'text': 'so now we created a project in netbeans.', 'start': 87.793, 'duration': 2.702}, {'end': 94.957, 'text': 'now, if we run it and you should have something like welcome to code igniter.', 'start': 90.495, 'duration': 4.462}, {'end': 98.098, 'text': 'so that means your code igniter is up and running.', 'start': 94.957, 'duration': 3.141}, {'end': 105.062, 'text': 'so before we start writing code, uh, go to your local in your, in your browser, localhost, phpmyadmin,', 'start': 98.098, 'duration': 6.964}, {'end': 109.623, 'text': 'and set up a database where we will have all over registered users.', 'start': 105.062, 'duration': 4.561}, {'end': 116.905, 'text': "So I've created a login database and it has a members table, and in that members table I have three fields ID,", 'start': 109.944, 'duration': 6.961}, {'end': 119.646, 'text': 'name and password and I have one dummy record in there.', 'start': 116.905, 'duration': 2.741}, {'end': 124.927, 'text': "So we'll be using this table to log in.", 'start': 120.326, 'duration': 4.601}, {'end': 129.348, 'text': 'So any user registered within this table will be able to log in.', 'start': 125.067, 'duration': 4.281}], 'summary': 'Created a codeigniter project in netbeans, set up a login database with a members table containing three fields and a dummy record for user login.', 'duration': 50.821, 'max_score': 78.527, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U78527.jpg'}], 'start': 0.089, 'title': 'Creating login system in codeigniter', 'summary': 'Illustrates the process of creating a login system in codeigniter, including downloading the framework, setting up the project in netbeans, and creating a database with a members table containing dummy records.', 'chapters': [{'end': 129.348, 'start': 0.089, 'title': 'Creating login system in codeigniter', 'summary': 'Illustrates the process of creating a login system in codeigniter, including downloading the framework, setting up the project in netbeans, and creating a database with a members table containing dummy records.', 'duration': 129.259, 'highlights': ['The chapter illustrates the process of creating a login system in CodeIgniter It covers the steps from downloading the framework to setting up the project in NetBeans and creating a database with a members table.', 'Downloading the framework and setting up the project in NetBeans The tutorial instructs to download the CodeIgniter framework from its website, unzip the file, create a new project in NetBeans, and ensure the framework is up and running.', 'Creating a database with a members table and adding a dummy record The process includes setting up a database in phpMyAdmin, creating a members table with fields for ID, name, and password, and adding a dummy record for testing.']}], 'duration': 129.259, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U89.jpg', 'highlights': ['The chapter illustrates the process of creating a login system in CodeIgniter, covering downloading the framework, setting up the project in NetBeans, and creating a database with a members table.', 'Downloading the CodeIgniter framework involves unzipping the file, creating a new project in NetBeans, and ensuring the framework is up and running.', 'Creating a database involves setting up a database in phpMyAdmin, creating a members table with fields for ID, name, and password, and adding a dummy record for testing.']}, {'end': 599.576, 'segs': [{'end': 287.163, 'src': 'embed', 'start': 164.301, 'weight': 1, 'content': [{'end': 169.284, 'text': 'finish. okay, so this will be the login view which will have a login form.', 'start': 164.301, 'duration': 4.983}, {'end': 193.361, 'text': 'so first of all I just declare a dog type and now I will create HTML, skeleton head tags and closing head tags, and within that I will have a title.', 'start': 169.284, 'duration': 24.077}, {'end': 231.403, 'text': 'okay, so then body tags okay, so within body i will create a form.', 'start': 212.876, 'duration': 18.527}, {'end': 243.255, 'text': 'so first of all i just create a h1 tag saying that login And then I will create a form.', 'start': 231.403, 'duration': 11.852}, {'end': 252.188, 'text': 'So I will use a PHP function called open form.', 'start': 244.256, 'duration': 7.932}, {'end': 254.752, 'text': 'I believe it is open form.', 'start': 252.308, 'duration': 2.444}, {'end': 256.575, 'text': 'Just give me one second.', 'start': 254.972, 'duration': 1.603}, {'end': 261.322, 'text': 'is form underscore open.', 'start': 258.519, 'duration': 2.803}, {'end': 264.385, 'text': "so that's the function which i'll be using.", 'start': 261.322, 'duration': 3.063}, {'end': 272.551, 'text': 'so within, as a argument to this function, we will pass the action where we want our form to go to.', 'start': 264.385, 'duration': 8.166}, {'end': 284.821, 'text': 'so and then i will close my form tag and within that i will create my fields.', 'start': 272.551, 'duration': 12.27}, {'end': 287.163, 'text': 'so first will be the username.', 'start': 284.821, 'duration': 2.342}], 'summary': 'Creating a login view with a login form using php function open_form.', 'duration': 122.862, 'max_score': 164.301, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U164301.jpg'}, {'end': 434.641, 'src': 'embed', 'start': 367.342, 'weight': 0, 'content': [{'end': 372.025, 'text': 'so after user login it will be redirected to this home page.', 'start': 367.342, 'duration': 4.683}, {'end': 396.308, 'text': "so I'll simply copy this and paste it here and I will get rid of this form and I will say welcome user, you have signed in, okay,", 'start': 372.025, 'duration': 24.283}, {'end': 400.233, 'text': 'and i will create a link.', 'start': 396.308, 'duration': 3.925}, {'end': 402.676, 'text': "so this link won't have anything at the moment.", 'start': 400.233, 'duration': 2.443}, {'end': 410.663, 'text': 'But I will make this link active in the next tutorial when I show you how to log out, how to code the log out.', 'start': 403.922, 'duration': 6.741}, {'end': 414.584, 'text': 'Okay, so this will be our homepage.', 'start': 411.224, 'duration': 3.36}, {'end': 419.825, 'text': 'So user will be redirected to this page after it has been logged in successfully.', 'start': 414.684, 'duration': 5.141}, {'end': 421.386, 'text': "So we've created our two views.", 'start': 420.146, 'duration': 1.24}, {'end': 430.028, 'text': "So what we're going to do next is we will go to our controller folder and it already has two files which we will get rid of,", 'start': 421.506, 'duration': 8.522}, {'end': 431.228, 'text': "as we don't need these two files.", 'start': 430.028, 'duration': 1.2}, {'end': 433.22, 'text': "So I'm going to do it.", 'start': 432.54, 'duration': 0.68}, {'end': 434.641, 'text': "I'm going to create our controller.", 'start': 433.26, 'duration': 1.381}], 'summary': 'After user login, redirected to homepage. creating controller and views.', 'duration': 67.299, 'max_score': 367.342, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U367342.jpg'}, {'end': 575.971, 'src': 'embed', 'start': 541.248, 'weight': 3, 'content': [{'end': 545.29, 'text': 'so we need to load that helper class before we call that form open function.', 'start': 541.248, 'duration': 4.042}, {'end': 549.312, 'text': 'so how to do this is go to your config folder and auto load.', 'start': 545.29, 'duration': 4.022}, {'end': 554.226, 'text': 'what we will auto load here is helper.', 'start': 550.723, 'duration': 3.503}, {'end': 567.597, 'text': "so here we will auto load form and let's auto load url, which will help us redirect to other pages, and we will auto load some libraries,", 'start': 554.226, 'duration': 13.371}, {'end': 570.839, 'text': 'one database and another.', 'start': 567.597, 'duration': 3.242}, {'end': 575.971, 'text': 'one would be form validation.', 'start': 570.839, 'duration': 5.132}], 'summary': 'Auto load helper, form, url for redirect, and libraries for database and form validation.', 'duration': 34.723, 'max_score': 541.248, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U541248.jpg'}], 'start': 130.588, 'title': 'Creating login views and forms', 'summary': "Covers creating a new 'login' view in the application folder, removal of existing files, creation of login form using html tags, and creating login and home views and controllers in php, with form validation and url redirection.", 'chapters': [{'end': 243.255, 'start': 130.588, 'title': 'Creating a login view in application folder', 'summary': "Focuses on creating a new 'login' view in the application folder, including the removal of existing files and the creation of a login form within the view, emphasizing the use of html tags and the structure of the form.", 'duration': 112.667, 'highlights': ["The chapter primarily emphasizes creating a new 'login' view in the application folder, which involves removing existing files and creating a login form within the view.", 'The speaker focuses on the structural elements of the login view, including the use of HTML tags such as head, title, body, and form tags.', 'The chapter also mentions the use of specific tags like h1 to designate the login header and emphasizes the creation of a form within the body tags.']}, {'end': 599.576, 'start': 244.256, 'title': 'Creating login and home views in php', 'summary': "Covers creating a login form using php, including the use of the 'form_open' function, creating username and password fields, and redirecting users to a home page upon successful login. it also includes the creation of login and home controllers, and the use of helper classes and libraries for form validation and url redirection.", 'duration': 355.32, 'highlights': ["Creation of login form using PHP and 'form_open' function The chapter covers the creation of a login form using PHP and the 'form_open' function to specify the form action, along with the creation of username and password fields.", 'Redirecting users to a home page upon successful login It includes redirecting users to a home page after successful login, displaying a welcome message, and creating a link for future logout functionality.', "Creation of login and home controllers in PHP It covers the creation of login and home controllers in PHP, with the 'login_controller' loading the login view and the 'home_controller' loading the home view.", 'Usage of helper classes and libraries for form validation and URL redirection The chapter includes the usage of helper classes like form validation and form_open, and libraries such as database and URL for form validation and URL redirection.', "Autoloading helper classes and libraries in PHP The process involves autoloading helper classes like 'form' and 'url', and libraries like database and form validation for seamless usage in the PHP code."]}], 'duration': 468.988, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U130588.jpg', 'highlights': ['Creation of login and home controllers in PHP, with form validation and URL redirection', "Creation of a login form using PHP and 'form_open' function, specifying form action", 'Redirecting users to a home page upon successful login, displaying a welcome message', 'Autoloading helper classes and libraries in PHP for seamless usage in the PHP code', 'Emphasizing the structural elements of the login view, including the use of HTML tags']}, {'end': 849.652, 'segs': [{'end': 672.621, 'src': 'embed', 'start': 599.576, 'weight': 0, 'content': [{'end': 609.814, 'text': 'we need to create a model, And that model will check with the database if the user exists in the database or no.', 'start': 599.576, 'duration': 10.238}, {'end': 618.957, 'text': "So what we're going to do is we will go to model folder and get rid of the file which is already there.", 'start': 610.435, 'duration': 8.522}, {'end': 626.96, 'text': 'And I will create a new model.', 'start': 624.839, 'duration': 2.121}, {'end': 630.861, 'text': 'And I will call it login model.', 'start': 627.2, 'duration': 3.661}, {'end': 645.366, 'text': "finish. now i'll create a class login model extends ci model.", 'start': 631.986, 'duration': 13.38}, {'end': 653.948, 'text': 'okay, this model will have one function, public function, and the function will be login.', 'start': 647.483, 'duration': 6.465}, {'end': 660.192, 'text': 'so this will check against the database if the user exists in the database or not.', 'start': 653.948, 'duration': 6.244}, {'end': 663.395, 'text': 'so what we need to do is now we need to query the database.', 'start': 660.192, 'duration': 3.203}, {'end': 665.576, 'text': 'so before we start creating the database,', 'start': 663.395, 'duration': 2.181}, {'end': 672.621, 'text': 'go again to your config folder and database folder and make sure that you enter your load your database here.', 'start': 665.576, 'duration': 7.045}], 'summary': 'Creating a new login model to check user existence in the database.', 'duration': 73.045, 'max_score': 599.576, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U599576.jpg'}, {'end': 849.652, 'src': 'embed', 'start': 714.31, 'weight': 1, 'content': [{'end': 722.232, 'text': 'So we will select name and pass fields from our database.', 'start': 714.31, 'duration': 7.922}, {'end': 731.114, 'text': 'So the table we need to select from is members.', 'start': 725.573, 'duration': 5.541}, {'end': 747.382, 'text': 'And we will write our where statement, db where So what else we need to do is this login function will take two parameters or two arguments.', 'start': 733.855, 'duration': 13.527}, {'end': 751.006, 'text': 'One will be name and the other one will be pass.', 'start': 747.723, 'duration': 3.283}, {'end': 756.371, 'text': "So we'll provide this login function with two arguments name and password,", 'start': 751.506, 'duration': 4.865}, {'end': 761.356, 'text': 'and this login function will check in the database if this name and password exists.', 'start': 756.371, 'duration': 4.985}, {'end': 764.099, 'text': 'So in our where clause we will write where.', 'start': 762.017, 'duration': 2.082}, {'end': 781.353, 'text': 'Name, name of the field in the database and the second parameter we will pass the argument and same for the password.', 'start': 769.877, 'duration': 11.476}, {'end': 795.282, 'text': 'name of the field in the database pass and then the argument pass.', 'start': 788.28, 'duration': 7.002}, {'end': 800.684, 'text': "okay. so next we're going to do is we will get the results from the database.", 'start': 795.282, 'duration': 5.402}, {'end': 801.924, 'text': "so i'll create another variable.", 'start': 800.684, 'duration': 1.24}, {'end': 808.927, 'text': 'query equals to dollar sign this dv get okay.', 'start': 801.924, 'duration': 7.003}, {'end': 823.516, 'text': 'so this will get all the results for this query from the database and now we will write if statements, if dollar sign,', 'start': 808.927, 'duration': 14.589}, {'end': 839.026, 'text': 'query num underscore rows function equals to one and then else okay.', 'start': 823.516, 'duration': 15.51}, {'end': 849.652, 'text': 'so if there is one row found in the database for that username and password, then we will return true.', 'start': 839.026, 'duration': 10.626}], 'summary': 'Login function checks name and password in database for authentication.', 'duration': 135.342, 'max_score': 714.31, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U714310.jpg'}], 'start': 599.576, 'title': 'Creating login model and database query', 'summary': 'Outlines the process of creating a login model for database validation, including creating a new model and discussing database querying for user authentication.', 'chapters': [{'end': 672.621, 'start': 599.576, 'title': 'Creating login model for database validation', 'summary': 'Outlines the process of creating a login model to validate users in the database, including creating a new model called login model with a function to check if the user exists in the database and ensuring the database is properly configured in the config folder.', 'duration': 73.045, 'highlights': ['A new model called login model is created to check if the user exists in the database, replacing the existing file in the model folder.', 'The login model includes a function to query the database and validate if the user exists in the database.', 'Ensuring the database is properly configured in the config folder to load the database.']}, {'end': 849.652, 'start': 672.621, 'title': 'Database query and login function', 'summary': 'Discusses querying a database for user authentication, utilizing a login function with parameters for name and password, and implementing conditional statements based on the number of rows returned.', 'duration': 177.031, 'highlights': ['The login function checks the database for the existence of a specific name and password combination, returning true if one row is found.', "Querying the database involves selecting the 'name' and 'pass' fields from the 'members' table.", 'The process involves utilizing conditional statements to determine the number of rows returned from the database query.']}], 'duration': 250.076, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U599576.jpg', 'highlights': ['A new model called login model is created to check if the user exists in the database, replacing the existing file in the model folder.', 'The login function checks the database for the existence of a specific name and password combination, returning true if one row is found.', 'The login model includes a function to query the database and validate if the user exists in the database.', "Querying the database involves selecting the 'name' and 'pass' fields from the 'members' table.", 'The process involves utilizing conditional statements to determine the number of rows returned from the database query.', 'Ensuring the database is properly configured in the config folder to load the database.']}, {'end': 997.426, 'segs': [{'end': 910.419, 'src': 'embed', 'start': 877.796, 'weight': 1, 'content': [{'end': 896.147, 'text': 'here we will create another function public function I will call it check login okay Now, this function will first of all validate our form.', 'start': 877.796, 'duration': 18.351}, {'end': 903.333, 'text': 'This function will check if the user entered any data in the input fields in the browser.', 'start': 896.947, 'duration': 6.386}, {'end': 906.536, 'text': "And if user don't enter, it will return an error message.", 'start': 903.973, 'duration': 2.563}, {'end': 910.419, 'text': 'And if user enter both fields, user name and password, then it will check.', 'start': 906.956, 'duration': 3.463}], 'summary': "Creating a 'check login' function to validate form data and handle user input in the browser.", 'duration': 32.623, 'max_score': 877.796, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U877796.jpg'}, {'end': 997.426, 'src': 'embed', 'start': 957.582, 'weight': 0, 'content': [{'end': 963.125, 'text': 'paste it and the same thing for the password input field.', 'start': 957.582, 'duration': 5.543}, {'end': 974.672, 'text': 'password, it should display to the user as password and this will be required.', 'start': 963.125, 'duration': 11.547}, {'end': 989.32, 'text': 'okay, and for this username as this is an email address so i will call i will add another validation rule which will be valid underscore email.', 'start': 976.73, 'duration': 12.59}, {'end': 993.883, 'text': 'so this will check if it is a valid email address entered.', 'start': 989.32, 'duration': 4.563}, {'end': 997.426, 'text': 'okay, so these two validations for our phone.', 'start': 993.883, 'duration': 3.543}], 'summary': 'Add validation rules for password and email input fields.', 'duration': 39.844, 'max_score': 957.582, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U957582.jpg'}], 'start': 851.214, 'title': 'Login controller function', 'summary': 'Discusses the development of a login model and function, including form validation rules for username and password inputs, and a check for user existence in the database, with a focus on the validation rules for the input fields and the call to the login model function.', 'chapters': [{'end': 997.426, 'start': 851.214, 'title': 'Login controller function', 'summary': 'Discusses the development of a login model and function, including form validation rules for username and password inputs, and a check for user existence in the database, with a focus on the validation rules for the input fields and the call to the login model function.', 'duration': 146.212, 'highlights': ['The function will first validate the form, checking if the user entered data in the input fields, and if both username and password are entered, it will proceed to check the existence of the user in the database.', 'Form validation rules are set for the username and password input fields, requiring input from the user and validating the format of the email address entered.', "If the user does not enter data in the input fields, an error message will be returned, and if both fields are entered, the function will call the login model function to check for the user's existence in the database."]}], 'duration': 146.212, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U851214.jpg', 'highlights': ['Form validation rules are set for the username and password input fields, requiring input from the user and validating the format of the email address entered.', 'The function will first validate the form, checking if the user entered data in the input fields, and if both username and password are entered, it will proceed to check the existence of the user in the database.', "If the user does not enter data in the input fields, an error message will be returned, and if both fields are entered, the function will call the login model function to check for the user's existence in the database."]}, {'end': 1180.029, 'segs': [{'end': 1155.675, 'src': 'heatmap', 'start': 1116.84, 'weight': 0, 'content': [{'end': 1128.586, 'text': 'so the action would be login controller slash, check, login.', 'start': 1116.84, 'duration': 11.746}, {'end': 1136.029, 'text': 'so it will point to check login function within login controller.', 'start': 1128.586, 'duration': 7.443}, {'end': 1143.673, 'text': "so save this and let's run our application and see if there are any error print getting printed on our page.", 'start': 1136.029, 'duration': 7.644}, {'end': 1145.554, 'text': 'so refresh this.', 'start': 1143.673, 'duration': 1.881}, {'end': 1145.794, 'text': 'let me.', 'start': 1145.554, 'duration': 0.24}, {'end': 1148.37, 'text': 'just okay.', 'start': 1145.794, 'duration': 2.576}, {'end': 1155.675, 'text': 'so if i click login and you can see that it is printing the error saying the username field is required and the password field is required,', 'start': 1148.37, 'duration': 7.305}], 'summary': 'Testing login functionality revealed 2 required fields errors.', 'duration': 107.21, 'max_score': 1116.84, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U1116840.jpg'}], 'start': 997.426, 'title': 'Form and validation process', 'summary': 'Covers form validation process, error handling, and validation rule implementation in the login form, including actions taken for errors and database validation.', 'chapters': [{'end': 1086.111, 'start': 997.426, 'title': 'Form validation and error handling', 'summary': 'Covers the process of form validation, where errors are checked and appropriate actions are taken, including loading the login view in case of errors and redirecting to another page if no errors are found.', 'duration': 88.685, 'highlights': ['Errors in form validation trigger the loading of the login view, while successful validation results in redirecting to another page.', 'Validation errors need to be echoed within the PHP tags to be printed in the login view.', 'Form validation errors are not currently being printed in the login view, requiring additional code to display them.']}, {'end': 1180.029, 'start': 1088.231, 'title': 'Validation rule error handling', 'summary': 'Discusses adding validation rules, specifying actions, and error handling in a login form, resulting in the display of username and password required errors and the need for database validation.', 'duration': 91.798, 'highlights': ['The function grabs all the errors generated by the validation rules and prints them on the page, enabling easy error identification and resolution.', "The action is specified as 'login' and the function points to 'check login' within the login controller, setting the stage for error checking and handling during the login process.", 'The form validation successfully prints errors for the username and password fields, indicating the need for user input, enhancing the user experience and error identification.', 'The next step involves checking user input against the database, highlighting the intention to enhance security and data validation in the login process.']}], 'duration': 182.603, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U997426.jpg', 'highlights': ['Form validation errors are not currently being printed in the login view, requiring additional code to display them.', 'Errors in form validation trigger the loading of the login view, while successful validation results in redirecting to another page.', 'The function grabs all the errors generated by the validation rules and prints them on the page, enabling easy error identification and resolution.', "The action is specified as 'login' and the function points to 'check login' within the login controller, setting the stage for error checking and handling during the login process.", 'The form validation successfully prints errors for the username and password fields, indicating the need for user input, enhancing the user experience and error identification.']}, {'end': 1568.38, 'segs': [{'end': 1310.475, 'src': 'embed', 'start': 1180.029, 'weight': 0, 'content': [{'end': 1186.552, 'text': 'so what i need to do is i will create a callback function.', 'start': 1180.029, 'duration': 6.523}, {'end': 1189.594, 'text': 'so i will create after user enter the password.', 'start': 1186.552, 'duration': 3.042}, {'end': 1191.895, 'text': 'i will create here a callback function.', 'start': 1189.594, 'duration': 2.301}, {'end': 1200.565, 'text': "I'll say call back, underscore and the function will be verify user.", 'start': 1193.539, 'duration': 7.026}, {'end': 1201.466, 'text': 'You can name it anything.', 'start': 1200.585, 'duration': 0.881}, {'end': 1204.069, 'text': "I'm just naming it verify user.", 'start': 1201.546, 'duration': 2.523}, {'end': 1207.311, 'text': 'Okay, now I need to define this function.', 'start': 1204.109, 'duration': 3.202}, {'end': 1216.66, 'text': 'So after login function, public function verify user.', 'start': 1207.792, 'duration': 8.868}, {'end': 1227.755, 'text': 'Okay so what this function will do is first of all we will grab the data entered by our user in input field.', 'start': 1219.187, 'duration': 8.568}, {'end': 1233.361, 'text': 'So name dollar sign this input.', 'start': 1227.835, 'duration': 5.526}, {'end': 1252.918, 'text': 'Post And username.', 'start': 1240.747, 'duration': 12.171}, {'end': 1261.005, 'text': 'So whatever user entered in the username field will be assigned to this name variable and the same with the password.', 'start': 1253.098, 'duration': 7.907}, {'end': 1267.311, 'text': 'Pass equal to dollar sign this input post.', 'start': 1261.385, 'duration': 5.926}, {'end': 1289.282, 'text': 'password. okay, so now what I will do is I will load my model, this load model, and the model is login model,', 'start': 1270.851, 'duration': 18.431}, {'end': 1303.271, 'text': 'and Write if statement to check in the database if the user exists, to know so, if dollar sign this login model and I will call the function login.', 'start': 1289.282, 'duration': 13.989}, {'end': 1310.475, 'text': 'so this login function is defined in login model, which is login, and it takes two parameters username and the password.', 'start': 1303.271, 'duration': 7.204}], 'summary': 'Creating a callback function to verify user input and check user existence in the database.', 'duration': 130.446, 'max_score': 1180.029, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U1180029.jpg'}, {'end': 1386.935, 'src': 'embed', 'start': 1343.666, 'weight': 3, 'content': [{'end': 1349.47, 'text': "So if the validation don't pass, if there's an error message, if the user doesn't exist in the database,", 'start': 1343.666, 'duration': 5.804}, {'end': 1357.294, 'text': 'then we will first of all set a message which will be returned to user.', 'start': 1349.47, 'duration': 7.824}, {'end': 1383.119, 'text': 'form validation set underscore message and the message we will set is for verify user function and the message will be incorrect email or password.', 'start': 1358.792, 'duration': 24.327}, {'end': 1386.935, 'text': 'please try again.', 'start': 1384.932, 'duration': 2.003}], 'summary': "If validation fails, set message for verify user function with 'incorrect email or password. please try again.'", 'duration': 43.269, 'max_score': 1343.666, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U1343666.jpg'}, {'end': 1458.693, 'src': 'heatmap', 'start': 1407.413, 'weight': 4, 'content': [{'end': 1416.76, 'text': 'this validation will fail and it will reload this page login view with this error message and if the user exists in the database,', 'start': 1407.413, 'duration': 9.347}, {'end': 1423.906, 'text': "it will take us to else statement and in else we'll simply what we're going to do is redirect.", 'start': 1416.76, 'duration': 7.146}, {'end': 1430.687, 'text': 'so it will redirect to home controller slash index.', 'start': 1423.906, 'duration': 6.781}, {'end': 1439.2, 'text': 'so it will redirect to home controller function, home controller function index, which is loading the home view.', 'start': 1430.687, 'duration': 8.513}, {'end': 1451.187, 'text': "okay, so now, if we run our application, Okay, and if I don't enter anything, it gives me the error message.", 'start': 1439.2, 'duration': 11.987}, {'end': 1458.693, 'text': "And what is the username and password? So in the database, it's navid at mail.com and the password is navid123.", 'start': 1452.228, 'duration': 6.465}], 'summary': 'Validation fails, redirects to home controller index if user exists in database.', 'duration': 31.787, 'max_score': 1407.413, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U1407413.jpg'}, {'end': 1556.137, 'src': 'embed', 'start': 1494.336, 'weight': 5, 'content': [{'end': 1506.442, 'text': 'should work fine, if i, if i enter the username and wrong password, There you go.', 'start': 1494.336, 'duration': 12.106}, {'end': 1508.965, 'text': 'It gives us message incorrect email or password.', 'start': 1506.522, 'duration': 2.443}, {'end': 1509.767, 'text': 'Please try again.', 'start': 1509.066, 'duration': 0.701}, {'end': 1520.142, 'text': 'And if I enter the right email and password login, it redirects us to this login home controller and welcome view.', 'start': 1509.787, 'duration': 10.355}, {'end': 1528.631, 'text': 'okay. so this is how you write a login system using code igniter.', 'start': 1521.528, 'duration': 7.103}, {'end': 1531.192, 'text': 'so in the next tutorial we will discuss sessions,', 'start': 1528.631, 'duration': 2.561}, {'end': 1537.094, 'text': "because at the moment there are some flows in our login system and in the next section we'll discuss session.", 'start': 1531.192, 'duration': 5.902}, {'end': 1550.555, 'text': 'so how can user set a session and how can session be destroyed so the user cannot access the pages which should be accessed after logging in?', 'start': 1537.094, 'duration': 13.461}, {'end': 1556.137, 'text': "so that's it for this tutorial, and if you have any problems and issues regarding this tutorial,", 'start': 1550.555, 'duration': 5.582}], 'summary': 'Demonstrates login system using codeigniter, plans to address login system flaws in next tutorial', 'duration': 61.801, 'max_score': 1494.336, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U1494336.jpg'}], 'start': 1180.029, 'title': 'Creating a codeigniter login system', 'summary': 'Demonstrates creating a callback function for user verification, user validation, and redirection, and provides a tutorial on setting up a codeigniter login system, including form validation and addressing system flaws.', 'chapters': [{'end': 1343.226, 'start': 1180.029, 'title': 'Creating callback function for user verification', 'summary': 'Discusses creating a callback function named verify user after the user enters the password, defining the function to grab user input data, and loading the login model to check if the user exists in the database.', 'duration': 163.197, 'highlights': ['Creating a callback function named verify user after the user enters the password.', 'Defining the function to grab user input data for username and password.', 'Loading the login model and using the login function to check if the user exists in the database.']}, {'end': 1439.2, 'start': 1343.666, 'title': 'User validation and redirection', 'summary': 'Discusses the validation process for user existence in the database, setting error messages, and the redirection of users, aiming to verify user credentials and redirect them to the home view upon successful validation or display an error message upon failing the validation.', 'duration': 95.534, 'highlights': ["The system sets a message 'incorrect email or password, please try again' for the verify user function if the user does not exist in the database, and returns false. Setting error message for user validation", "Upon successful validation, the system redirects to the home view using the 'redirect' function. Redirection upon successful validation", 'The validation fails if the user does not exist, leading to the reload of the login view with the error message. Handling validation failure']}, {'end': 1568.38, 'start': 1439.2, 'title': 'Codeigniter login system tutorial', 'summary': 'Demonstrates the process of creating a login system using codeigniter, including setting up the database and handling form validation. it also hints at addressing flaws in the system and future discussion topics like sessions and user access control.', 'duration': 129.18, 'highlights': ['The tutorial covers creating a login system using CodeIgniter, with a specific focus on form validation and database setup.', "It mentions the specific username and password for the database, which are 'navid@mail.com' and 'navid123'.", 'The speaker acknowledges flaws in the current login system and hints at addressing them in the next tutorial, emphasizing the importance of session management for user access control.', "The chapter emphasizes the importance of feedback and interaction, encouraging viewers to reach out with issues and highlighting the speaker's contact information and social media presence."]}], 'duration': 388.351, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/HoRMvG5OK5U/pics/HoRMvG5OK5U1180029.jpg', 'highlights': ['Creating a callback function named verify user after the user enters the password.', 'Defining the function to grab user input data for username and password.', 'Loading the login model and using the login function to check if the user exists in the database.', "The system sets a message 'incorrect email or password, please try again' for the verify user function if the user does not exist in the database, and returns false. Setting error message for user validation", "Upon successful validation, the system redirects to the home view using the 'redirect' function. Redirection upon successful validation", 'The tutorial covers creating a login system using CodeIgniter, with a specific focus on form validation and database setup.', 'The speaker acknowledges flaws in the current login system and hints at addressing them in the next tutorial, emphasizing the importance of session management for user access control.']}], 'highlights': ['The chapter illustrates the process of creating a login system in CodeIgniter, covering downloading the framework, setting up the project in NetBeans, and creating a database with a members table.', 'Creation of login and home controllers in PHP, with form validation and URL redirection', 'A new model called login model is created to check if the user exists in the database, replacing the existing file in the model folder.', 'Form validation rules are set for the username and password input fields, requiring input from the user and validating the format of the email address entered.', 'Form validation errors are not currently being printed in the login view, requiring additional code to display them.', 'Creating a callback function named verify user after the user enters the password.']}