Secure Login Form Authentication System (Cookies, Sessions, Token, PDO) PHP & MySQL Tutorial Part 4

preview_player
Показать описание
I am using PDO for my database access which is a safe method against common sql injection attacks.
Even though I simply go with my root mysql user in the tutorial I recommend you guys to create a dedicated mysql user with just enough permission so you can use the login form as it will protect your database or site from evil people trying to drop tables or delete entries.
The method I use in this video can be found in the links below. Feel free to apply this best practice method to your projects as this is actually pretty good.

Feel free to leave CONSTRUCTIVE criticism for me as I am NOT programming in PHP or SQL professionally.

#Website

#Social

#Messenger
Skype: hazardedit
Рекомендации по теме
Комментарии
Автор

why you don't show how you fix the problem you left in part 3 the one that you are still in the login page even though you're already logged in ? but here it is already fix without showing how

kurtpatrickgalvez
Автор

Didn' you miss the return False? is always a good idea to return false when the function doesn't return what it should...

nelsonparreira
Автор

My form is not logging it alway redirect to the login page and don't stay on the index.

rv
Автор

Hi, can you post your final code in a zip?

MrNagySebestyen
welcome to shbcf.ru