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

preview_player
Показать описание

Welcome to the second part of these tutorial series where I will be "live coding" a secure login form system with cookies sessions and tokens in php and mysql using a mysql database.
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.

#Social

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

one of the best content that I watch - tnx

jamalamrins
Автор

You confuse so much ^^ Was this a livestream? For now i do not know if you go to fix it later but you forgot the semicolon on a sql statement (not needed but better if). For now if you enter any data you get forwarded to login.php but see no login form anymore

Takio
Автор

You run the sql query with the where condition using the cookie vars and later you check again if $row['sessions_userid'] = $_COOKIE['userid']? if it is not equal the query would not return any rows? Why checking twice?

groovebird
Автор

You might want to do some preparation first before doing this tutorial. Drink some strong coffee that might help you as well as you seem to be sleepy and disoriented while doing your code.

mikerivera
Автор

Very functional login system. However, too poorly organized video to watch. Very unstable typing, like at some points I did not even catch what he did there. Looks like the video was made for the developer himself. In addition, there were a lot of errors in single files that should have been fixed before jumping to other ones. This way people would be able to avoid messes after watching this video.

faridisayev
Автор

For some reason when I login the random string 32 I receive is a random repeat of the same letter :S

jvincent
Автор

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

MrNagySebestyen
Автор

Please i have this error when i submit the form "Use of undefined constant string - assumed 'string' "

tchabopaul
Автор

very bad code. Totally confuse. You should do coding step by step. also file structure very bad way

arjishat
Автор

Please make a Tutorial:
Absolutely necessary: Unity3D + NET Reflector/Reflexil

subsvn
Автор

Can you make a video about how to bypass c++ auth (tcp) :)

sportube
Автор

Warning: Illegal string offset ' ' when calling func::createString(32);

georgeyusto
Автор

Good Day brother


Can you send me the codes that you use in this video?
Thanks!

sovereigngrey
welcome to shbcf.ru