PHP Tutorials: Register & Login (Part 10): Registration Form and Validation (Part 3)

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

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

Thanks Alex the explanation of your mistakes is a useful part of the tutorial it helps us to self correct our own code, thanks again for doing these

playboycity
Автор

and when sometimes he is thinking and he stops the video =P agree with you though! AWESOME!

stamtheodmusic
Автор

He should do like a live stream on one of these. That way if someone notices and error, we can tell him right away haha! Awesome tutorial as always though! :D

toms
Автор

Yeah, nice idea! I hope Alex consider this idea.

TheRoxasth
Автор

Hey Alex. i dont know if it already said, but i dont see the action in the <form action=" " method="post">? where must i action to it? register.php or hope to hear form you. Thanks for what all you do with php love your videos

MrChillco
Автор

I would do the form validation on client side with javascript and validate it on server side as well, since you can give the errors on runtime with javascript. Server side validation is mandatory if the user removes the javascript validation.

jarmo_kiiski
Автор

Check your form. The cause of the problem maybe come from the typo of the name element in the form tag.

TheRoxasth
Автор

You forgot ")" after $_POST['username'] at 7.16

FabianCook
Автор

To check for spaces, remove the "=== true" from the if statement.
"if (preg_match("/\\s/", $_POST['username']))"

KalenKubik
Автор

As i know, "/\\s/" match only if the string has '\' and 's' character in a row. It doesn't not match the whitespace. How it is return true then? Anyone can explain it to me?

TheRoxasth
Автор

why use if(empty($errors) === true) rather than if(empty($errors)) ???

MoRamzan
Автор

getting an error on print_r($errors);   Anyone have any idea why?

mikeeskenasy
join shbcf.ru