In this tutorial, you are going to learn how to make a website using HTML & CSS and add some functionality to a saved user input into our local server, so be sure to watch the complete series of videos and start building your awesome website today.
Download the Complete file here: #Mirror1,#Mirror2
Hey guys Ronaldo here and welcome back to this tutorial we're programming so what did we have done in the previous video we created the login form so in this tutorial, we will learn how we can code the PHP so to check whether the user data is was already accessed to our table and in the user when the users type the username and password into this login form so then the PHP will check whether that data was already saving I was already inverted into our database then uh it will check whether uh the data is correct then when the click login so he will be successfully log in to our website so let's make it now so we need to go to the PHP so we need to open the PHP so we have the PHP file so this PHP file will check so the existence of user information so into our database table so we need to add a new variable then this variable will be the uh the table so users user tables or table select metal table then we need to put we need to pass the name our users uh table so I guess users table so the name of our table in our
PHP so let me try to check so if we have really the same so let me just check so so we can be sure that we have the same name so for reference names that we need to go to so we have users tables right here so we go to our table variables our user's tables for now what we need to do we need to change some of the URL so for the data so what we need to do we need to only post the username and password so we need to reboot this email so we need to remove this email the next will be we're going to remove this password too so we need to remove including this one so we will remove this if statement so we need to remove
Now I need to remove then what you need to do will be instead of inserting we need to uh select so instead of inserting we need to okay so we need to select so we need to remove the statement so instead of inserting we need to write select select select select data and then we need to write select asterisk ram the name of our table will be users table where do now we need to get back we need to get the name of the column label so okay we need to go to the user's table so we can check the username so we will only select from username and password so we need to go to we need to spell it right so the username
may be equal to single quotation mark the name will be the username and we need to write and so the password will be equal to uh single need to put single quotation mark tune and password review the variable password so let's work we need to put a simple quotation mark so password so we need password same competition mark so we are checking here the username and password so uh for username maybe go to the username right here and the password so the password will be equal to this one the value so of the HTML forms statements now instead of writing them if we need to remove this if statement so we need to remove the if statement
but let me just remove the if statement that like that remove so we will destroy a function then we need to put it into our variables so we need to put variable results result in quantum query and we need to change this one to select data and once we have done that we need to ah we need to put a semicolon now we need to press enter then we need to declare another variable will be num rows or row count so I will call this row count will be equal MySQL num rows so the number of rows opens close parenthesis then inside we need to pass the variable result so this one the variable result optic query then here we need to check if we need to check so if the local dollar sign so lockout will be equal to one so we need to check if there are results in our database tables and check if pro-con is equal to 1 mini
we need to write an echo statement so echo statement will be successfully logged in or login success but in successfully foolish so it's gonna be successful then we will so just remove this one successfully we need to call the header function then we need to reset it so we need to have uh we need to redirect we press in three seconds then URL will be equal to uh, for example, the main PHP file so right now we're gonna go to the main pc file because it is not created yet after that we need to delete this one so we need to delete so we need to click this one so let me just delete else we will say username and click
so we need to write an echo statement so the incorrect username incorrect user name or password and put exclamation marks then we will the user to the do the same page now if we click save and we need to check like in PHP if we should look in PHP call this login save PHP now if we go to our login form so now let me just go to the login form to refresh so you can see if we click create we go to the create page we click log in so we go to the login page now if I try I type the row username and password so example so okay we have an error so heater string expecting or okay syntax and respected header in line 20 so we need to fix this one
okay so we put that put semicolon here so to put the call then we need to refresh the page so let me just undo type the username of us so you can see use incorrect username and password so now if I type the correct username and password to the port and the password will be the correct password we should see successfully plug in successfully so guys that are for in this tutorial so I hope you learned something about this video and if you like this video please be sure to like and subscribe to my channel and if you have some question write it in a comment below and as soon as I get back I will try to answer your comments so thanks for watching guys bye for now
#Home Screen Page HTML Code:
#HomeScreen Page CSS Code:
0 Comments