Never knew you could just update the string with a new value 🤔 out of all the years I've been using PHP too! Time to do some coding updates 😂 Thanks so much for the video!!!
Hey, i was trying to learn how to make a secure registration system for a new web app, all i can say is you are really helpful and clear. Amazing job continue with such tutorials. Subscribed!
What Mr.Sean did in 21mts, other Channels do half that in 180mts, while all the time incorporating several confusing code Routines, thus making them too complex for anyone to follow, and yet garner all the traffic and more so leading a lot astray. YT, should have a mechanism put in place to identify Genuine and service minded individuals like Mr. Sean and promote them.
I did my research before deciding on a signup / login method and found the email verification keeps a lot of the riffraff out. Your method here is a gem. Thank you very much. PS I hope to add SMS / phone verification in as well soon.
Those 6 dislikes are literally BS. They probably don't have a smtp server running, therefore their mail() function didn't work, so they decided to dislike it. Anyway, this video was amazing and very helpful. Thank you very much, it helped me understand some stuff I was iffy about. Good luck, I'm definitely going to subscribe.
Just came across your channel and I'm thoroughly enjoying it. I see your last video was posted 4 months ago, and I'm hoping that you're just on an extended break. You're videos are so easy to follow, I'm hoping to learn a lot more php and MySQL from future videos!
So, a couple things here. 1) Use password_hash when storing passwords (check out my video). 2) Using prepared statements is the best approach to prevent SQL injection (check out my video). 3) You'll notice I did not strip htmlspecialchars from the GET method, exposing the database. Do that.
Love this channel, loved the explanation, loved the syntaxis, loved everything. Great work, you helped me understand few things. Anyways I have to improve. But the only way to learn is practice everyday
Bless you. This has been extremely helpful. I'm going to do the code and try it out but from your explanation, I'm sure things will work out. You are audible, clear, detailed and just the perfect person for this topic. Thanks so very much.
As always with your videos clear precise and easy to understand, thanks I have learnt a lot from all your videos. It would be great to see an update on how to convert this code to work with PDO and the new security as shown in your other video Password Security. I have tried a few times, but my knowledge is not good enough yet. I can get the updated way to hash but not yet worked out how to get verify to work. But this way works a treat thanks again!
12:36 This code you're typing is extremely susceptible to SQL injection. You should never immediately put user provided data directly into a SQL string for any reason. You need to use prepared statements as well as validate all inputs
@@johnndees1397 As I mentioned you should be using prepared statements as well as validating input. I prefer to use PDO not the mysqli_* functions but if you're stuck with them then you can use the mysqli prepare functions. Here's an example from the PHP documentation: www.php.net/manual/en/mysqli.prepare.php
Hi! Thank you for this great video. You showed us within 21 min what most other channels would have take 2 hours to explain and not with your level of clarity. Trust me! Your code works amazingly well. But one thing... I would like to restrict the emails duplication. I tried a thousand codes. Nothing works. Your help would be greatly appreciated. Thank you in advance!
The problem with copying and pasting source code is that those who do it almost never know how it actually works. Thanks for this excellent video and the clear explanation.
Fair comment, but it is also nice to know the tutorial you're following actually works before you invest the time trying to understand and learn from it.
I am not the best at PHP but how do I know if I'm "Logged in". Is there a session value or anything that I can use to see if the user is logged in? I want to do certain changes to my website when I am actually logged in. For example, it says login at the top right corner when I'm logged out and when I'm logged in it will say logout. Very good video! I was searching for a video like this for about 1 hour. Glad I found this video tutorial.
He podido seguir el procedimiento minuto a minuto. Su código ya esta especificado para PHP 7 por lo que no me dio errores en ningún momento. Llevo una semana tratando de implementar el sistema y siguiendo su vídeo lo pude implementar y adaptar a mis requerimientos en 2 días. Gracias. I have been able to follow the procedure minute by minute. Its code is already specified for PHP 7 so it did not give me errors at any time. I have been trying to implement the system for a week and following its video I was able to implement and adapt it to my requirements in 2 days. Thank you. (Google Translation).
I followed and copied the code on this carefully but I find that the database activated status is being updated to being verified on sending of the email to the newly registered user, without the email link having to be clicked on. Does anyone else have this issue?
Hey Mike - It wouldn't be possible to update the verified flag when sending the email unless specifically coded to. If you'd like, I can look over your code.
@@phpBasics Thanks for your reply, very much appreciate that. Where can I post my code to. It's on a dev site and don't really want to throw url out there at the moment.
The thankyou.php page is just an arbitrary page to re-direct the user to. It contains no PHP; just a page that says thank you. If you need further assistance, feel free to reach me on Skype: CoolEditz
Just a little note: if you use else if statement after checking if the username is long enough, it's pointless to append previous text for checking password, because if username isn't long enough it won't check the next statement. Instead, another if statement instead of else if will do the thing. Just a little note. ;) ua-cam.com/video/LXQfEFEfFcM/v-deo.html
Yaw thanks for this amazing tutorial. I just have one problem and I will past the error message below. " Trying to get property 'num_rows' of non-object in C:\xampp\htdocs\web2 egisteration form\verify.php on line 11"
Thank you for the video. Can you please make a video or explain how to auto verify an account without email verification or manual verification from the backend. I mean the system should automatically verify the new user account.
@@RacoonCH - You can run a query against the database to see if that username already exists. If you need help, feel free to message me on Skype: CoolEditz
That was just a semicolon ( ; ) error on line 29 provide the text with double quote to end the string and ; to end the statement. Here it is: what's in the video-----> echo "x y z what to edit-------> echo "x y z "; That's it it works well
Not working for me:`( does 'send email from localhost' videos all settings required for this process, or i should reset those files as default settings,,,
this code is not updating becose am working from my domain what do i replace ($resultset->num_rows == 1) with so that it can update if($resultset->num_rows == 1){ //validate the mail by updating the database $update=mysqli_query($link,"UPDATE users SET verified = 1 WHERE vkey = '$vkey' LIMIT 1");
if($update){ echo"Your account has been verified sucessifuly. You may now log in"; }else{ echo $mysqli->error; }
"Warning: Attempt to read property "num_rows" on bool in C:\xampp\htdocs egistration\verify.php on line 9 This is invalid" why is it showing this in my verify.php file?
Everyone should be warned that this video introduces a severe SQL injection vulnerability around 12:30, which means any app coded with this method IS vulnerable and probably can be exploited to take full control of your database. This can be solved by properly escaping the user-submitted input. The author should correct the video or delete it.
i followed a 2hr tutorial and got it working. but with your 15min login and this 20min registration/email verify tutorials i cant get either working!!!
Help on the verify.php I entered word from word of your code however it skips the code and just says something went wrong. If I can email you my code could you tell me what I’ve done wrong. I retraced my steps and went very slowly .
I´m using pdo and got the error message "PDOStatement: Field 'verified' doesn't have a default value" (and got another one saying field vkey needs a default value too). I set null for vkey and 0 vor veriefied. when saving first user, vkey gets updated with the key. everything´s fine then. thanks!
Your soothing voice and clear instructions make this tutorial the best out there. Thank you for this sir you are great
Never knew you could just update the string with a new value 🤔 out of all the years I've been using PHP too! Time to do some coding updates 😂
Thanks so much for the video!!!
Hey, i was trying to learn how to make a secure registration system for a new web app, all i can say is you are really helpful and clear. Amazing job continue with such tutorials. Subscribed!
What Mr.Sean did in 21mts, other Channels do half that in 180mts, while all the time incorporating several confusing code Routines, thus making them too complex for anyone to follow, and yet garner all the traffic and more so leading a lot astray. YT, should have a mechanism put in place to identify Genuine and service minded individuals like Mr. Sean and promote them.
I did my research before deciding on a signup / login method and found the email verification keeps a lot of the riffraff out. Your method here is a gem. Thank you very much. PS I hope to add SMS / phone verification in as well soon.
Those 6 dislikes are literally BS. They probably don't have a smtp server running, therefore their mail() function didn't work, so they decided to dislike it. Anyway, this video was amazing and very helpful. Thank you very much, it helped me understand some stuff I was iffy about. Good luck, I'm definitely going to subscribe.
its not working for me bcz of smtp server . how i can have one ?
really like this channel. sean has a great voice and should be doing voice overs as a side hustle.
Just came across your channel and I'm thoroughly enjoying it. I see your last video was posted 4 months ago, and I'm hoping that you're just on an extended break. You're videos are so easy to follow, I'm hoping to learn a lot more php and MySQL from future videos!
Hi Ray. I have quite a bit of new and exciting material to cover. Videos coming very soon.
So, a couple things here. 1) Use password_hash when storing passwords (check out my video). 2) Using prepared statements is the best approach to prevent SQL injection (check out my video). 3) You'll notice I did not strip htmlspecialchars from the GET method, exposing the database. Do that.
Love this channel, loved the explanation, loved the syntaxis, loved everything. Great work, you helped me understand few things. Anyways I have to improve. But the only way to learn is practice everyday
took me a week to complete the video from installing required stuff to running into problems, to fixing updated things anyhow great video!
Bless you. This has been extremely helpful. I'm going to do the code and try it out but from your explanation, I'm sure things will work out. You are audible, clear, detailed and just the perfect person for this topic. Thanks so very much.
i try and mail function doesn to work, whats about about you
Awesome work ! I integrate that to my project and it's working like a charm.
This is the first effective tutorial I've watched that provides an email verification system. It worked BTW, god bless!
This is the best tutorial on this topic by far. Good explanation, and everything works well! Thank you so much!
As always with your videos clear precise and easy to understand, thanks I have learnt a lot from all your videos. It would be great to see an update on how to convert this code to work with PDO and the new security as shown in your other video Password Security. I have tried a few times, but my knowledge is not good enough yet. I can get the updated way to hash but not yet worked out how to get verify to work. But this way works a treat thanks again!
12:36 This code you're typing is extremely susceptible to SQL injection. You should never immediately put user provided data directly into a SQL string for any reason. You need to use prepared statements as well as validate all inputs
@@johnndees1397 As I mentioned you should be using prepared statements as well as validating input. I prefer to use PDO not the mysqli_* functions but if you're stuck with them then you can use the mysqli prepare functions. Here's an example from the PHP documentation:
www.php.net/manual/en/mysqli.prepare.php
this was awesome! it worked very well for me
The idea behind this channel is to teach people how to code, not provide free source code for lazy people.
Hi! Thank you for this great video. You showed us within 21 min what most other channels would have take 2 hours to explain and not with your level of clarity. Trust me!
Your code works amazingly well. But one thing... I would like to restrict the emails duplication. I tried a thousand codes. Nothing works.
Your help would be greatly appreciated. Thank you in advance!
I couldn't agree with you more. Keep it up bro!
The problem with copying and pasting source code is that those who do it almost never know how it actually works. Thanks for this excellent video and the clear explanation.
Fair comment, but it is also nice to know the tutorial you're following actually works before you invest the time trying to understand and learn from it.
@@selfregulator Well, if that's not gonna work, you'll have to 'self regulate' it. ;)
I am not the best at PHP but how do I know if I'm "Logged in". Is there a session value or anything that I can use to see if the user is logged in? I want to do certain changes to my website when I am actually logged in. For example, it says login at the top right corner when I'm logged out and when I'm logged in it will say logout. Very good video! I was searching for a video like this for about 1 hour. Glad I found this video tutorial.
Hi Max. Check out my Login System video. If this doesn't answer your question, hit me up on Skype: Cooleditz -
ua-cam.com/video/-7JdLn5gOfg/v-deo.html
Works perfectly, thank you :D
You are great, thank you. Clear voice and nice explanations.
Wow you have the gift of teaching! Thank you very much. God bless you!
wow I thought it would be difficult to do that, apparently not because your explanation was very clear.
edit : stuck on mail server
Great tutorial, very clear explanation, you have a new subscriber now
This has been helpful. Thanks bro!
I watched your video and it was very helpful for me. Thanks a lot for making such informative videos.. and the method of explaining was good.
Amazing and your explanation way is very simple
thank you Boss
Great tutorial! Much appreciated!
Nice... Keep up the good work👍👍👍
Thank you very much. You sir are a gentleman and a scholar.
He podido seguir el procedimiento minuto a minuto. Su código ya esta especificado para PHP 7 por lo que no me dio errores en ningún momento. Llevo una semana tratando de implementar el sistema y siguiendo su vídeo lo pude implementar y adaptar a mis requerimientos en 2 días. Gracias.
I have been able to follow the procedure minute by minute. Its code is already specified for PHP 7 so it did not give me errors at any time. I have been trying to implement the system for a week and following its video I was able to implement and adapt it to my requirements in 2 days. Thank you. (Google Translation).
Thank you very much! God bless
Voice is so smooth.
Great Tutorial. Happy Learning 😃
Loved your way 💚
thank bro...this was very helpful for my project !
This Video was really helpful for me...Thank you soo much.
your voice, so deep😭
Very Nice Explanation!
You are a master I was looking for that
Thank you sir! do u do paid lil gigs?
Message me on skype: CoolEditz
Top voice sir...
Thanks very much for doing this tutorial it's helped me no ends. :)
LOVE the video!
Nice. Thank you for this great tutorial.
Shiit your so good on thiis ❤️
i love your videos
cool!
great! thats all i want. thank u a lots
When I click the Register Account verification, it only shows "The requested URL was not found on this server.". It did not execute the verify.php :(
I liked it! Thank you
for the lazy typers / copy/pasters here :)
$headers .= "MIME-Version: 1.0" . "
";
$headers .= "Content-type:text/html;charset=UTF-8" . "
";
Very useful, thank you
It worked thaks bro .. god bless
such a good toturial
you're awsome. buddy! thks
instead of declaring database in every file create one file to declare the database and call it in every file but thanks for your videos 👍
Thank you sir ji🙏🏾🙏🏾🙏🏾
yeah great tutorial but ive gotta little problem
Trying to get property 'num_rows' of non-object in C:\xampp\htdocs\verification\verify.php on line 10
yeah ive got the same problem toooo how to fix it
Helpful!
thanks very much
nice video sir thank you
I followed and copied the code on this carefully but I find that the database activated status is being updated to being verified on sending of the email to the newly registered user, without the email link having to be clicked on. Does anyone else have this issue?
Hey Mike - It wouldn't be possible to update the verified flag when sending the email unless specifically coded to. If you'd like, I can look over your code.
@@phpBasics Thanks for your reply, very much appreciate that. Where can I post my code to. It's on a dev site and don't really want to throw url out there at the moment.
@@mikeyells5353 You can Skype me at CoolEditz or use pastebin
@@phpBasics Thanks. I'll sort out tomorrow. I'm in England and it's now late (yawn) night. Really do appreciate your help.
Hi.... just wondering if you've had a chance to look at the pastebin yet?
Parse error: syntax error, unexpected identifier "VALUES"
I do not see thankyou.php works in your video. Although I have typed all codes following you but unable to complete it as there is no thankyou.php ..
The thankyou.php page is just an arbitrary page to re-direct the user to. It contains no PHP; just a page that says thank you. If you need further assistance, feel free to reach me on Skype: CoolEditz
Thanks, but a question that you didn't provided your sending email password so how could it send email without verifying? Thanks again sir
Just a little note: if you use else if statement after checking if the username is long enough, it's pointless to append previous text for checking password, because if username isn't long enough it won't check the next statement. Instead, another if statement instead of else if will do the thing. Just a little note. ;) ua-cam.com/video/LXQfEFEfFcM/v-deo.html
thank you sir
thanks man
Yaw thanks for this amazing tutorial. I just have one problem and I will past the error message below.
" Trying to get property 'num_rows' of non-object in C:\xampp\htdocs\web2
egisteration form\verify.php on line 11"
me too. Do you have a fix?
Same
The solution is : You made an error in the SELECT .... Just verified.
When I do the login it says all the code with $mysqli-> in front of it. Does the tutorial work on the newer PHP versions?
Same problem. Can you answer.. @phpBasics? :)
ThankYou
Thanks A Lot!
Thank you for the video. Can you please make a video or explain how to auto verify an account without email verification or manual verification from the backend. I mean the system should automatically verify the new user account.
What's the point of verification if it auto-verifies? You can simply leave out the verification altogether.
@@RacoonCH - You can run a query against the database to see if that username already exists. If you need help, feel free to message me on Skype: CoolEditz
We have a capstone project and we need to do a email verification
Could you provide the code for this via Github or Google Drive?
thanks :)
How you fix this syntax problem? I can’t do it...
That was just a semicolon ( ; ) error on line 29 provide the text with double quote to end the string and ; to end the statement.
Here it is:
what's in the video-----> echo "x y z
what to edit-------> echo "x y z ";
That's it it works well
@@ajay6057 Thank you haha
Not working for me:`(
does 'send email from localhost' videos all settings required for this process, or i should reset those files as default settings,,,
i followed everything but my mail is not sending......
Did you watch the video on how to setup email from localhost?
@@phpBasics i watched only this one
this code is not updating becose am working from my domain
what do i replace ($resultset->num_rows == 1) with so that it can update
if($resultset->num_rows == 1){
//validate the mail by updating the database
$update=mysqli_query($link,"UPDATE users SET verified = 1 WHERE vkey = '$vkey' LIMIT 1");
if($update){
echo"Your account has been verified sucessifuly. You may now log in";
}else{
echo $mysqli->error;
}
When I send people to my verify page with the vkey in the link I get error that "The requested URL was not found on this server."
Are you not using password_verify ? Can you explain why not, and if you would use it with password_hash, how would you implement it ?
Hi, I have a video on password_hash. If you need assistance, you can reach me on Skype: CoolEditz
I got error smtp server response 530 5.7.0 must issue a starttls command first..i cant resolve it its annoying
I couldn't really sent an email from localhost.... how can I do that??? I tried other configurations but no lock! ??? :X
could you please make this PHP Registration w/ Email Verification in PDO version
I DID EXACTLY what you did,but when i submit the form,it just reloads and nothing happens
Skype: CoolEditz
"Warning: Attempt to read property "num_rows" on bool in C:\xampp\htdocs
egistration\verify.php on line 9
This is invalid" why is it showing this in my verify.php file?
More than likely a syntax error.
The video is well detailed but it's not working for me.
How can send in form of OTP verification to user that signup on my website??
Everyone should be warned that this video introduces a severe SQL injection vulnerability around 12:30, which means any app coded with this method IS vulnerable and probably can be exploited to take full control of your database.
This can be solved by properly escaping the user-submitted input.
The author should correct the video or delete it.
Read the description
i followed a 2hr tutorial and got it working. but with your 15min login and this 20min registration/email verify tutorials i cant get either working!!!
Help on the verify.php I entered word from word of your code however it skips the code and just says something went wrong. If I can email you my code could you tell me what I’ve done wrong. I retraced my steps and went very slowly .
Notice: Trying to get property 'num_rows' of non-object in C:\xampp\htdocs\messenger\verify.php on line 7
You probably didn't put the $ in front of the variable.
How would i program an email account?
Hello Sir, I have a problem that i don't see any mail. Please, help me.
I´m using pdo and got the error message "PDOStatement: Field 'verified' doesn't have a default value" (and got another one saying field vkey needs a default value too). I set null for vkey and 0 vor veriefied. when saving first user, vkey gets updated with the key. everything´s fine then. thanks!
I believe you need to establish default variables in PHPMyAdmin.
i manage to send me some confirmation but i cant continue through the verification when it comes to me loggin in. :(
Sir, how to specify the domain of the email.