New Social Network - Part 3 - Account Validation

preview_player
Показать описание
In this video we'll be adding validation to the account creation page.

This will prevent duplicate accounts from being created, it will ensure passwords are a certain length and it will ensure usernames can only contain specific characters and be a specific length.

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

howCode is the most well-produced coding channel on YouTube. My biggest gripe with many channels is verbosity; most video's run times could be cut in half and the point still made. These videos waste no time getting to the point. It might go a little fast but if you didn't get it the first time, watch it again or pause and study the code. I'm also glad the narrator is sticking to the subject matter and not trying to be a comedian. Great job!

ibuprofenPill
Автор

Hi howCode. I would like to say. I have recently started following this series. Your Social Network build in core PHP is really good. I look forward to following along with the rest of the course / series. Thanks for such a great channel. Keep up the great work! Thanks again.

markbush
Автор

I am Loving the speed...straight to the point execution...love this series

fredrickfaraj
Автор

I follow the code but after running it i get errors. I fix the error my self without any video. I barely know php but have learned lots already

alltime
Автор

Thank for your work. I think there is an error in query construction. So the explode function is not correct and this because if you write the same user the error message is related the the second check and not to the first. If you use different error message, is more simple to find mistake.
So the right way to write explode is explode($divider, $string) :

explode (" ", $query)[0] //not explode ($query, " ")[0]

Well thanks for you work and your interesting video tutorials. Thanks again

kalogaos
Автор

Great series for learning PHP. Big up howCode!

kennethkipchumba
Автор

I had a problem on Line 9in create-account.php . It appears to be the ':' at DB:query. So I watched the video again and he changes it into DB::query. So if anyone has the same problem just do that.

thepandaahbear
Автор

This is a great video - save for the errors listed below. Might be worthwhile to address those to keep people going with the series -- even if it is just updating the listed source documents with comments.
I am just learning, so if the comments hadn't pointed out some of the problems, I may have stumbled. Cheers!

kelseaelaine
Автор

if you also want to check if the email address is already taken:

$query = 'SELECT * FROM users WHERE username=:username OR email=:email';
$params = array(':username' => $username, ':email' => $email);
if (!DB::query($query, $params)) {
....

cedric_ds
Автор

if possible then please use VUE JS in front end.make more difference then your previous social networking sites, realtime etc and Thanks

davidD-rnnk
Автор

The best username regex (according to me lol) is ' /^[A-Za-z][A-Za-z0-9]{5, 31}$/' it also checks for the its length 6 to 32 chars
Thank me later

ahsanullah
Автор

how to fix mysql problem?
all users has same id 0
why mysql doesnt create unique user id for each user?

mad_dmitry
Автор

dear how code and other responders, so many methods that I have not understood, please respond me, what should I learn in order to understand this series?

idealistgeneration
Автор

Most of this should be in a Controller and Model if you are doing it in a MVC pattern ??

JamesJohnAgar
Автор

Great vid! I'd love to see that calculator tutorial with the lexer you did in Python being expanded into something bigger, like a programming language. Any chance if and when we'll be seeing something like that?

kplays_
Автор

I know it’s late but I have an issue where “user already exists” is always displayed. If you could help me that would be great

daniellaurie
Автор

How code i have question
While validating users we are only checking for if username exists
But not if email already exists or not.

This is a serious bug
We are not checking if the entered email id is already in db
Which means we are allowing users to register with many usersnames with one email

Reply what you think

keashurminati
Автор

After I added the if "(!DB:query('SELECT username FROM users WHERE username=:username', i got a http 500 error

erlendbanken
Автор

HowCode please don't let me down, i have a question...How do you make a subscription type of system for the users on the social network like the need to pay an amount of money per month if the want to continue using the social network please help

ErnyVibes
Автор

Do you type that fast or is the video increased the speed when you typing?

trapido