Difference between revisions of "PHP-and-MySQL/C4/User-Registration-Part-5/English-timed"
From Script | Spoken-Tutorial
Sandhya.np14 (Talk | contribs) |
|||
Line 5: | Line 5: | ||
|- | |- | ||
|00:00 | |00:00 | ||
− | |Welcome to the 5th part of the User | + | |Welcome to the 5th part of the '''User Registration''' tutorial. |
|- | |- | ||
|00:04 | |00:04 | ||
− | |We are going to tidy up a few bits and pieces together in our registration login process. | + | |We are going to tidy up a few bits and pieces together in our '''registration''' '''login''' process. |
|- | |- | ||
Line 25: | Line 25: | ||
|- | |- | ||
|00:24 | |00:24 | ||
− | | | + | |Let's see if I can login. Let's say '''Username''' is "alex" and my '''Password''' is the password that I used. |
|- | |- | ||
|00:34 | |00:34 | ||
− | |I can see that when I click in | + | |I can see that when I click in '''Login''', again, "Incorrect password". |
|- | |- | ||
Line 37: | Line 37: | ||
|- | |- | ||
|00:44 | |00:44 | ||
− | |Let me type this in | + | |Let me type this in '''Username''' and type in my password. |
|- | |- | ||
|00:49 | |00:49 | ||
− | |It will tell me | + | |It will tell me "That user doesn't exist". |
|- | |- | ||
Line 53: | Line 53: | ||
|- | |- | ||
|01:11 | |01:11 | ||
− | |The way we do this is, we go back to our login page | + | |The way we do this is, we go back to our login page which we covered in the previous tutorial - the '''User Login''' tutorial. |
|- | |- | ||
Line 69: | Line 69: | ||
|- | |- | ||
|01:46 | |01:46 | ||
− | |So, this is the password I am typing in here. | + | |So, this is the password I am typing in here. It's quite an odd one. |
|- | |- | ||
|01:53 | |01:53 | ||
− | |"slicer u k 1". Okay and this is checking this and this password here is equal to slicer u | + | |"slicer u k 1". Okay, and this is checking this and this password here is equal to slicer u k 1. |
|- | |- | ||
|02:02 | |02:02 | ||
− | |But this "password" is equal "dbpassword". So we are not getting the comparison. | + | |But this "password" is equal "dbpassword". So, we are not getting the comparison. |
|- | |- | ||
Line 85: | Line 85: | ||
|- | |- | ||
|02:15 | |02:15 | ||
− | |So now this will actually be equal to this | + | |So now this will actually be equal to this; so this is encrypted "slicer u k 1" which is equal to this "slicer u k 1". |
|- | |- | ||
|02:26 | |02:26 | ||
− | |So we are comparing an md5 encrypted password to an md5 encrypted password in our database. | + | |So, we are comparing an "md5" encrypted password to an "md5" encrypted password in our database. |
|- | |- | ||
|02:35 | |02:35 | ||
− | |Let me resubmit this form again | + | |Let me resubmit this '''form''' again. Error again! |
|- | |- | ||
|02:39 | |02:39 | ||
− | |Let me try again. Click on | + | |Let me try again. Click on '''Login'''. No, it's not working. |
|- | |- | ||
|02:45 | |02:45 | ||
− | |Let's check this. "password" equals to "POST password" so md5 is the password. | + | |Let's check this. "$password" equals to "POST password", so "md5" is the password. |
|- | |- | ||
Line 112: | Line 112: | ||
|- | |- | ||
|03:06 | |03:06 | ||
− | |The problem here is that our md5 password is absolutely correct but it is being compared to a password which is cut short in our database. | + | |The problem here is that our "md5" password is absolutely correct but it is being compared to a password which is cut short in our database. |
|- | |- | ||
|03:19 | |03:19 | ||
− | |That's because if we go to our structure and go down to our password field here and edit this, we have currently got a length of 25 as its limit. | + | |That's because if we go to our structure and go down to our password '''field''' here and edit this, we have currently got a length of 25 as its limit. |
|- | |- | ||
|03:35 | |03:35 | ||
− | |So we are going increase the limit for this to, say, 100. | + | |So we are going to increase the limit for this to, say, 100. |
|- | |- | ||
|03:40 | |03:40 | ||
− | |I am not exactly sure how long an md5 string is, but I will say length value = 100. Save that. | + | |I am not exactly sure how long an "md5" string is, but I will say length value = 100. '''Save''' that. |
|- | |- | ||
Line 132: | Line 132: | ||
|- | |- | ||
|03:58 | |03:58 | ||
− | |So, register. Choose your username. | + | |So, register. Choose your 'username'. |
|- | |- | ||
Line 152: | Line 152: | ||
|- | |- | ||
|04:27 | |04:27 | ||
− | |So now when I try to log back in and let me type this properly. | + | |So, now when I try to log back in and let me type this properly. |
|- | |- | ||
|04:34 | |04:34 | ||
− | |We can login and we are in. Okay so check things like string length. | + | |We can login and we are in. Okay, so check things like string length. |
|- | |- | ||
Line 168: | Line 168: | ||
|- | |- | ||
|04:48 | |04:48 | ||
− | |And that is | + | |And that is '''User Registration'''. |
|- | |- | ||
|04:50 | |04:50 | ||
− | |This is followed on from our | + | |This is followed on from our '''User Login''' tutorial. |
|- | |- | ||
|04:54 | |04:54 | ||
− | |So by putting these together, we have got a fully functional user register and login process. | + | |So by putting these together, we have got a fully functional '''user register''' and '''login''' process. |
|- | |- | ||
|05:02 | |05:02 | ||
− | |I will be using this in a lot of my project work. Say for example | + | |I will be using this in a lot of my project work. Say for example, |
|- | |- | ||
Line 188: | Line 188: | ||
|- | |- | ||
|05:16 | |05:16 | ||
− | |So check my projects on user login and registration for more information. | + | |So, check my projects on '''user login''' and '''registration''' for more information. |
|- | |- | ||
Line 196: | Line 196: | ||
|- | |- | ||
|05:30 | |05:30 | ||
− | |Please subscribe for updates in the future. Thanks for watching. This is Madhur dubbing for the Spoken Tutorial project.{| border=1 | + | |Please subscribe for updates in the future. Thanks for watching. This is Madhur, dubbing for the Spoken Tutorial project.{| border=1 |
Revision as of 00:07, 10 June 2015
Time | Narration |
00:00 | Welcome to the 5th part of the User Registration tutorial. |
00:04 | We are going to tidy up a few bits and pieces together in our registration login process. |
00:11 | Then we'll give a full test to see if it really works. |
00:14 | In the last part, you saw that I registered myself in this database. |
00:19 | Everything has worked out fine and I am at the login screen here. |
00:24 | Let's see if I can login. Let's say Username is "alex" and my Password is the password that I used. |
00:34 | I can see that when I click in Login, again, "Incorrect password". |
00:40 | This doesn't mean that my username hasn't been found. |
00:44 | Let me type this in Username and type in my password. |
00:49 | It will tell me "That user doesn't exist". |
00:52 | But here, it is saying that my username does exist but my password is wrong. |
00:58 | Now, the reason my password is wrong is that my plain text password here is being compared to my "md5-encrypted" password inside my data base. |
01:11 | The way we do this is, we go back to our login page which we covered in the previous tutorial - the User Login tutorial. |
01:22 | At the part where we compare our passwords to check if they match. |
01:29 | That's checking our username there and this is checking our password. |
01:35 | We need to check our password. At the moment, let's say I typed in my password as "slicer u k 1". |
01:46 | So, this is the password I am typing in here. It's quite an odd one. |
01:53 | "slicer u k 1". Okay, and this is checking this and this password here is equal to slicer u k 1. |
02:02 | But this "password" is equal "dbpassword". So, we are not getting the comparison. |
02:10 | We get to choose this when we encrypt our password. |
02:15 | So now this will actually be equal to this; so this is encrypted "slicer u k 1" which is equal to this "slicer u k 1". |
02:26 | So, we are comparing an "md5" encrypted password to an "md5" encrypted password in our database. |
02:35 | Let me resubmit this form again. Error again! |
02:39 | Let me try again. Click on Login. No, it's not working. |
02:45 | Let's check this. "$password" equals to "POST password", so "md5" is the password. |
02:56 | Let me go back and refresh this. |
03:00 | I type my password. Al-right, I know what the problem is here. |
03:06 | The problem here is that our "md5" password is absolutely correct but it is being compared to a password which is cut short in our database. |
03:19 | That's because if we go to our structure and go down to our password field here and edit this, we have currently got a length of 25 as its limit. |
03:35 | So we are going to increase the limit for this to, say, 100. |
03:40 | I am not exactly sure how long an "md5" string is, but I will say length value = 100. Save that. |
03:50 | I am going to browse our table and delete this value. Then I am going to go back and re-register. |
03:58 | So, register. Choose your 'username'. |
04:02 | Let's say "alex", like I said before. Choose a password, let's say "slicer u k 1". And I will click "Register". |
04:14 | "You have been registered. Return to login page". |
04:18 | Now, let's check our database again. |
04:21 | This is looking longer already, it hasn't been cut short because I have changed the length of this. |
04:27 | So, now when I try to log back in and let me type this properly. |
04:34 | We can login and we are in. Okay, so check things like string length. |
04:41 | Hopefully you have got this. |
04:43 | If you want me to expand this tutorial please just let me know. |
04:48 | And that is User Registration. |
04:50 | This is followed on from our User Login tutorial. |
04:54 | So by putting these together, we have got a fully functional user register and login process. |
05:02 | I will be using this in a lot of my project work. Say for example, |
05:07 | I might create a project on something that uses a user login and user registration. So I will be using this a lot. |
05:16 | So, check my projects on user login and registration for more information. |
05:23 | If you have any questions or would like me to expand on anything, please just let me know. |
05:30 | border=1 |