How to Make Login Form in PHP and MySQL

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to the online attitude call my name is asif ali in this video i'm going to show you how to connect login form with database in PHP and mysql i'm so this is a logon form i have designed so i use this form to connect the my SQLite database so this is the very simple code of HTML documents I have that in previous lecture so in this video I'm going to show you how to link up the database to Indy text boxes like this and this so there are very simple process to connect the secure server and make a login form with database so for system you need to this is a very basic syntax of HTML document and I have basically used the style sheet to design the login form so we will use PHP to link up with database ok so let's start it this is the font take after the closing form tag before the closing a form tag I use the method post and then action I just wide the high sign because I want to display any message on this page right so I just fight hash sign then the first input text box name is username and second text box name is password right we will get the value because with the help of name username and password okay so let's get started to the use PHP okay first step we need to connect DC cursor PHP and MySQL eyes so I use variable first host and I use localhost and second is user username is a root and then password in putting and the fourth I declare DB and I use demo we will clear the demo database but this time I have led so the next step we need to use the database so I go to my PHP my admin panel database so I'll use new keyword click on new and clear the database like demo and then I clear the table mm I use login form and enter the column three columns first column is ID Rama key identity we've used and second column name is use the name and third password so we need to three columns so I use three columns and click OK so I use first ID and second user and third password first is integer second is a voucher and third is a voucher type right so I enter the range 50 and 50 use the name and password I range in the 50 range right and then I scroll half and then I use primary key identity to first column a teacher right okay 70 file database and here you can see it the database has met on the PHP myadmin tenner so the next step you need to go on insert into the record so I use simply in admin and admin admin username and admin password central click go okay and then I use select statement and check the call here you can see the first column name is number is 1 and user name is user column is admin and password column is admin right then we would use them on PHP so let's open the editor then I use first my SQL underscore connect and I use the variables copied and pasted here and the underscore user dollar this for password right then I use the database so I call my SQL underscore select underscore DB okay and pass this variable on here then we would use if statement to check the first text box value if this text box is empty so I use single Kamal's and copy the first text box name values spaced health after the trenches you need to write speed records and press ENTER then we need to get these this text box and the password text box values so we need to create the variable unit and I assigned the dollar underscore post and the first text box name is username and second test box name is password right then we will use the seek you will use the Curie and assign this variable so I just declared variable and assigned develop curing select static from my database name my table name is login okay okay my check I check the column names select static from my database name my database name is the login I login form ok login form ok login form and then I use very key word then I select first column nail second column name user and use a sign equal sign and select use a single compose double commas and dot dot sign and assign B first variable on here copy it and paste it then are after the lost commas you need to write end keyword and then you need to write again second column name my second column name my second column database name is a password pass and assign the second variable I copied and pasted then after the single comma you need to write the limit of the database column values both values right then terminate sign ok then we will use caddy another variable and you use MySQL Curie and a scientist variable on here right okay we'll use the assisted man to check the record check the database rows available or not so I use mouse Kol underscore num underscore rows and parentheses and assign this variable on hair and use double equal sign and one if the this theory basically this is a variable after running the scuri the value assigned on this variable then I did pass this variable on skill query using this variable and I use this variable on hell if this variable value equal a 1 then use this portion you have successfully logged locked in right and I call exit function after these clipper gates we need to write else command and then we need to if any person I mean data doesn't match any D text boxes its ma our database then call as statement you have entered in correct password right and I use again functional so let's check it so my username video is admin and password videos Edmund so let's check it either say the H I set on an exceptional logic you let me see it where is error set why okay I don't use the post because why set a set user name and then I check where is air hmm I think clear okay here I do not use the dollar underscore post to get the data using text boxes so let's check it okay here you can see it the farm is displayed as that so let's check it I enter any wrong information five them Edmond and I enter the password two three four five then I click login you have entered incorrect password so let's check again I enter the past user name admin and enter the password admin again and click login then you can see how you have successfully logged in so this is a very simple video about the login form so I hope you are understood as well thank you very much for watching see you and next lecture or next video
Info
Channel: OnlineITtuts Tutorials
Views: 1,417,000
Rating: undefined out of 5
Keywords: Login Form in PHP, How to Make Login Form in PHP, How to Make Login Form in PHP and MySQL, how, to, make, login, form, in, php, and, mysql, OnlineITtuts Tutorials
Id: aIsu9SPcGbU
Channel Id: undefined
Length: 12min 53sec (773 seconds)
Published: Fri Jul 07 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.