New Social Network - Part 4 - Logging in Users

preview_player
Показать описание
In this video we'll be doing the login validation to check each users details before they login.

This means that users will only be able to login using the correct details, once they provide the correct details we'll be able to create a login token to securely check if the user is logged in on each page they visit.

Don't forget to subscribe for more!
Рекомендации по теме
Комментарии
Автор

I'm really enjoying this series so far.

samwhisenhunt
Автор

i have added the same source code, still whenever I login with the correct password it shows the invalid
Please help...

priyanshu.tiwari
Автор

Saying that only password is incorrect is not a good idea (for obvious reason). It is better to say that username or password is incorrect.

ihor
Автор

I am using the exact same code on github, but I get this error :
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'' in Stack trace: #0 PDOStatement->execute(Array) #1 DB::query('INSERT INTO use...', Array) #2 {main} thrown in on line 10

marcellpick
Автор

Please tell me how to fix Incorrect Password Issue :(

AmolImpal
Автор

I figured out a way to solve the incorrect passwords bug that a lot of people seem to be having. it seems that the password column in the users table needs to have a VARCHAR that is longer than 60 in order to fit the hash'd password. I changed my password VARCHAR to 1000 with this MySql command:

ALTER TABLE users MODIFY password VARCHAR(1000);

After I modified the table, every user I created after that seems to be able to login just fine.

MilesRoseProductions
Автор

If your code has invalid password check the database if the login details are under the right field, I inserted password into email field and almost ran mad for over 2hrs debugging

alittleextra
Автор

I have liked password_harsh() method and it's counterpart password_verify() from this video, thank I never learned about this.

amanmtindi
Автор

Hey you forget about the sql injection?
Or it is in next videos?
Please also tell methods to stay safe from sql injections.

mianaliasjad
Автор

Thanks a whole Lot for this new series, but How can we get rid of the password incorrect issues i have been seriously stocked for a long time now please really need your help... and i believe others will still....

emmanuelchika
Автор

I love your tutorials, I ve been following the series but when I enter the correct password it keep returning incorrect password I m sure, I did everything are you taught correctly but it returning the echo incorrect password.please help.thanks

jamesyoung
Автор

It says incorrect password when it is correct! Help me pls

marcellpick
Автор

If i want to create the login form inside my index file i just copy the php soce from the login file to the index?

shaharlz
Автор

Hey man just a quick question. How come you gotta use [0]['password'] after already specifying in the query that you want password where username = :username. Won't the query itself only return a single value?

namahshrestha
Автор

The passwords and email are stored in the wrong places in the database, how do I fix this?

erlendbanken
Автор

1.can we track user last login address?how this is done?i have no idea
2.please use remember me check box(cookies)

biresths
Автор

When i am accessing the same php file in android. It's not working. Please any one can help on this.

saurabhjain
Автор

will the social network later include image upload, commenting and like! stuff?

ThePixelitomedia
Автор

How would you implement this code if the login form and registration form were on the same page? I'm running into errors where my website is printing out the wrong messages.

princecarter
Автор

i entered the correct username and password and even looked at your sourcecode but it always shows the error "incorrect password". could you help me out....

surajshrestha