Signup and Login with PHP and MySQL

  Рет қаралды 270,941

Dave Hollingworth

Dave Hollingworth

Күн бұрын

Learn how to create signup / registration, login and logout using PHP, MySQL and best practices.
Please consider supporting my channel:
☕ ko-fi.com/davehollingworth
Recommended hosting:
davehollingworth.net/hosting
Part 2: PHP Password Reset by Email is here: • PHP Password Reset by ...
In this video you'll learn how to:
• create a signup page
• validate the data on the server in PHP
• save the signup data to a MySQL database using PHP
• create login and logout pages
• validate the data in the browser using JavaScript
• validate the email using an Ajax request
Code shown in the video:
‣ github.com/daveh/php-signup-l...
Relevant documentation:
‣ watercss.kognise.dev/
‣ www.php.net/manual/en/functio...
‣ just-validate.dev/
00:00 Introduction
00:23 Signup form HTML
03:24 Add classless CSS
04:04 Process form in PHP
05:12 Server-side validation
08:33 Hash the password
09:59 Create the MySQL database
11:36 Connect to the database from PHP
14:27 Insert a new record
17:00 Prevent duplicate emails
18:55 POST / Redirect / GET
20:33 Login form
21:53 Process the login form
24:45 Verify the password
27:45 Use the session for login
28:10 Add index page
30:42 Add logout page
32:22 Show logged-in user's name
34:30 JavaScript signup validation
37:35 Custom validation
39:20 Remote validation
42:49 Summary
#PHP #MySQL #signup #login

Пікірлер: 786
@nnzzz9581
@nnzzz9581 Жыл бұрын
Hi Dave! Starting as a Web Dev intern soon, and I just wanted to say, how great and informative these videos are for understanding "what's under the hood" so to say. Keep up the amazing work!
@cosmonautilus1181
@cosmonautilus1181 Жыл бұрын
This has got to be the best php tutorial on KZbin. I really appreciate your work Dave! keep going.
@retrorusty2012
@retrorusty2012 Жыл бұрын
WOW! I always want videos like this. You do an amazing job. Thorough explanation on why each code block is chosen. How to test implementation along the way. And a full video from start to finish comprehensively solving the entire subject at hand. Thank you for your dedication to excellence and kindly sharing it with the rest of us.
@Oletechiegirl
@Oletechiegirl 2 жыл бұрын
This HAS TO BE the best tutorial I’ve seen on this subject. Excellent and thank you.
@salma-amlas
@salma-amlas Жыл бұрын
i'm a beginner at php and i found this extremely clear and easy to understand! thank you so much!
@samuelrichard4117
@samuelrichard4117 7 ай бұрын
I've been struggling for days on how to setup php on my website and you just made everything clear in 45 minutes. Cheers!
@DavidHeyManS
@DavidHeyManS Жыл бұрын
The best signup and login with php and mysql video I've seen so far with some serious validation. Thank you for the amazing video Dave!
@annemimosa
@annemimosa Жыл бұрын
I followed 5 different tutorials from other authors and none of them worked! This is the only one that worked! Code works! Thank you so much!!!
@DavidEMunozR
@DavidEMunozR Жыл бұрын
I never found someone who explains the way you do. Thank you very much.
@kingsleyrams742
@kingsleyrams742 Жыл бұрын
Fatal error: Uncaught Error: Undefined constant "require_DIR_" in C:\xampp\htdocs\process-signup.php:29 Stack trace: #0 {main} thrown in C:\xampp\htdocs\process-signup.php on line 29 i keep getting this error
@zbysiu100
@zbysiu100 Жыл бұрын
I have just discovered this wonderful tutorial of PHP. Incredible. Thank you very, very much!!!
@markprouty5029
@markprouty5029 Жыл бұрын
I've looked at a number of other login and register tutorials. This is the easiest to work with! THANKS
@errollsipagan4617
@errollsipagan4617 Жыл бұрын
Thank you Dave. I've been brushing up my php skills and your video helped me a lot.
@user-yy1rx9wv3l
@user-yy1rx9wv3l Жыл бұрын
It's the best and most complete video i saw on that topic to create a register and login form. Thank you Dave !!
@sixtusushahemba9419
@sixtusushahemba9419 Жыл бұрын
Wow, this's a very clear and deep explanation here. Thanks so much for the tutorial. It's obvious you really deeply understand this, based on your explanation and work through. It's so clear and confident. I really appreciate your effort into this tutorial.
@ayam3330
@ayam3330 7 ай бұрын
one of the video that got me understand, i've watched 5-more videos, and this is clear. tommorow is deadline for university assigment and my lecturer never teach php
@mikeg12345
@mikeg12345 4 ай бұрын
Dave, this was exactly what I was looking for, and it's a great, clear & concise tutorial - thanks for making it!
@Hevletica
@Hevletica Жыл бұрын
Superb to-the-point video. I especially enjoyed the AJAX + API part, you nailed it under a couple of seconds.
@Suskanna
@Suskanna Жыл бұрын
Thank you so much for this tutorial! It was super easy to follow and I didn't get any errors (other than the ones showed in the video of course). This'll be a big help for a lot of people!
@WesleyInsleyComedy
@WesleyInsleyComedy Жыл бұрын
Very well explained. Great work, Dave! And thank you very much.
@TheFuture36520
@TheFuture36520 Жыл бұрын
I like your style as it is very consistent throughout.
@NetReklam-om3ds
@NetReklam-om3ds 2 ай бұрын
You are a great Teacher!!! This is the best php tutorial i've seen. There are so many tutorials where you can't understand what about they are talking. Your tutorial is step by step, so clear and easy to understand. I must watch all your videos... Thanks a lot!!!
@emmanuellyons6827
@emmanuellyons6827 5 ай бұрын
This is the best PHP tutorial on KZbin! ❤️❤️❤️❤️🤜🤛
@saeidvaygani9709
@saeidvaygani9709 Жыл бұрын
I think this video is one of the best tuturial of creating the registration form in youtube.
@ryanford516
@ryanford516 Жыл бұрын
This is super informative and really explained in simple terms. Thank you!
@anatolydemianov9270
@anatolydemianov9270 6 ай бұрын
One of the best tutorials I've ever watched! Keep up the good work and thank you very much!
@dannyreg8405
@dannyreg8405 Жыл бұрын
I second the vote about being the best php tutorial on KZbin. I'm still confused (born that way) about the validation of the information before being written to the DB.
@cortexmap
@cortexmap Жыл бұрын
Brilliant, thank you for the free and open education.
@lincolncardines8099
@lincolncardines8099 11 ай бұрын
This tutorial... Just wow... I don't know how to code as I am in the Network Admin side of IT, but with this tutorial I as able to run my very first programming page.
@CanadianGuyPeter
@CanadianGuyPeter Жыл бұрын
This is such a great tutorial. You explained everything step by step which is easy to understand.
@jacoboferkalfa3476
@jacoboferkalfa3476 7 ай бұрын
Dave, thank you for your tutorial. Very well explained and useful.
@dijanamatkovic6136
@dijanamatkovic6136 Жыл бұрын
I really love this tutorial! You should make more Projects like this like (Task List, Converter, Calculator, .... ) I would really loved if you could be my Mentor . You clearly have magic to teach... Can wait to see a new project.
@aijiexi
@aijiexi 10 ай бұрын
I especially enjoy your tutorials; they are some of my favorites. As a person who is career-transitioning into full stack development, I would grasp further from this tutorial if it was presented separately as PHP and JS, front and back end. Your current method was most logical. However, being only slightly familiar with JavaScript, I became a bit lost when you began this tutorial's JSON/front-end section. My javascript course will start in October, but I wanted to mention this for your consideration for those who are not able to return to school for instruction. I have now subscribed to your channel. Your time and expertise are much appreciated!
@dave-hollingworth
@dave-hollingworth 9 ай бұрын
Thank you very much for the feedback!
@Maja-pf3vp
@Maja-pf3vp 7 ай бұрын
Thanks for explaining this so well! Each step is so clear. Subscribed :D
@alamkhan105
@alamkhan105 Жыл бұрын
Excellent, thank you, Dave!!
@shreeyachatterji7972
@shreeyachatterji7972 Жыл бұрын
Amazing tutorial loved it
@nicoschulz4037
@nicoschulz4037 Жыл бұрын
This tutorial is awesome! Thank you Dave! I'll try to add your "email-verification tutorial" to this. Maybe with an extra email verification link for user verification. I am a total newbie to php and coding, but your tutorials are THE BEST on youtube! Thank you very much!
@dave-hollingworth
@dave-hollingworth Жыл бұрын
Thank you for your kind words! I'm hoping to do a "part 2" to this soon with email verification, remember me and so on
@shakhzodweb-programmer7034
@shakhzodweb-programmer7034 4 ай бұрын
thank you I am a beginner and it helped me a lot to understand the fundamental. You have explained all one by one and clear. Thanks!!!
@davidrangel7533
@davidrangel7533 Жыл бұрын
Man, I thought the thumbnail of your video was a creepypasta, but u really help me to understand the topic.
@Shams_
@Shams_ Жыл бұрын
Till now the best tutorial I have ever seen 👍
@nigelpallatt
@nigelpallatt 2 жыл бұрын
Very Good! Very well explained and demonstrated.
@frankkaundamukhuni
@frankkaundamukhuni 3 ай бұрын
You are a great lecturer your code helped me
@TheFuture36520
@TheFuture36520 Жыл бұрын
Very bright tutorial and it's so easy to understand the concepts.
@daria.butterflycookies
@daria.butterflycookies 9 ай бұрын
amazing tutorial. you explain everything very clearly and add code that is crucial for typical website building, for us not to forget. thank you very, very much!
@efbYouTube
@efbYouTube 2 жыл бұрын
excellent stuff as always! & txs again (& again & again!!) for yr wonderful class on udemy. constantly using as a ref! u've completely won me over to php & as on an old vb programmer i genuinely never thought i'd ever say that! :)
@dewangatheakshana1049
@dewangatheakshana1049 Жыл бұрын
This is super informative and really explained in simple terms. Thank you
@soloelite3995
@soloelite3995 Жыл бұрын
Hi Dave, You have been so helpful with this code. Thank You!
@osvaldodiasdossantos6625
@osvaldodiasdossantos6625 4 ай бұрын
Thank you for how so well you taught this, leaving a chance for improvement from ourselves. Much appreciated.
@user-sl3tq8zv6k
@user-sl3tq8zv6k Жыл бұрын
Explanation is very clear, thank you so much!
@f.t.5859
@f.t.5859 10 ай бұрын
Amazing content, every step is explained why this is happening, very calm instructor. Sad there's no javascript projects in your channel Dave. If you could indicate some channel that have the same aspects of your channel I would appreciate. Thanks.
@andy_frank
@andy_frank Жыл бұрын
Excellent tutorial. Heading to part 2. Thank you very much!!!
@1909jaya
@1909jaya Жыл бұрын
Thank you so much!! Im your fan from now on!
@casiangutu545
@casiangutu545 Жыл бұрын
This tutorial is pure gold
@codecr8ive
@codecr8ive Ай бұрын
You are the best! Thank You for yours tutorials.
@bamboo8212
@bamboo8212 Жыл бұрын
This is great work! I can tell you are a god. Now my mind has enlighted and I understand much more than I did before watching this video! Thank you!
@alanwilliams8622
@alanwilliams8622 Жыл бұрын
Excellent thanks Dave.
@tanyidavid2755
@tanyidavid2755 2 ай бұрын
Good teacher. Articulates well and straight to rhe point
@AsicEdits
@AsicEdits 3 ай бұрын
this is gold, best tutorial I've seen so far
@pablofalco
@pablofalco Жыл бұрын
Finally, I see the whole enchilada in one go! Thank you. The only thing that it didn't work for me was just- validate, I couldn't find (yet) why not.
@dave-hollingworth
@dave-hollingworth Жыл бұрын
Check the browser console to see if there are any network errors loading the justValidate library
@pivotai525
@pivotai525 Жыл бұрын
Thank you very much! Really helpful!
@gin8275
@gin8275 11 ай бұрын
Thanks a lot sir for this useful video. It helps me a lot for making the mid term project
@nehalkamal6490
@nehalkamal6490 Жыл бұрын
This channel is amazing
@aaronsoto5711
@aaronsoto5711 Жыл бұрын
I love your videos!
@solange3172
@solange3172 Жыл бұрын
BEST TUTORIAL EVERRR THANK YOU!
@Pedders-is9th
@Pedders-is9th Жыл бұрын
Very nicely done and basically just saved my bacon, great tutorial and added a lot of security measures which are always important :)
@kingsleyrams742
@kingsleyrams742 Жыл бұрын
Fatal error: Uncaught Error: Undefined constant "require_DIR_" in C:\xampp\htdocs\process-signup.php:29 Stack trace: #0 {main} thrown in C:\xampp\htdocs\process-signup.php on line 29 i keep getting this error
@Steve-Richter
@Steve-Richter Жыл бұрын
ton of info. Excellent video. thank you!
@farahirdina8804
@farahirdina8804 Жыл бұрын
THANK YOU SO MUCH FOR THIS, YOU SAVED MY LIFE I LOVE YOU
@Youcan352
@Youcan352 Жыл бұрын
thank you, you made it very clear for me
@KristofferMorad
@KristofferMorad Жыл бұрын
You are the best!
@zb2747
@zb2747 Жыл бұрын
Simple and clear! As long as PHP has been around it’s quite difficult to find solid tutorials - thank you!
@vodkafordinner540
@vodkafordinner540 Жыл бұрын
My code stops at $stmt->execute() doesn't go to else plz answer me
@dav2108
@dav2108 Жыл бұрын
@@vodkafordinner540 did you add the correct amount of strings? in $stmt->bind_param. For example I have first_name, last_name, username, password_hash. so mine is: $stmt->bind_param("ssss", $_POST["first_name"], $_POST["last_name"], $_POST["username"], $password_hash);
@dav2108
@dav2108 Жыл бұрын
4 strings, 4 lots of s (as opposed to 3 lots of s in the video)
@dave-hollingworth
@dave-hollingworth 2 жыл бұрын
What other topics would you like to see a video on? Please let me know!
@aogunnaike
@aogunnaike 2 жыл бұрын
I would say OOP concepts in general , Solid principle, Phpunit
@NedumEze
@NedumEze 2 жыл бұрын
A PHP Event Calendar as I explained below. Using Datetime, PDO for database access, & dispay a message on a date that meets some criterion. Pls.
@efbYouTube
@efbYouTube 2 жыл бұрын
creating an api plz :)
@efbYouTube
@efbYouTube 2 жыл бұрын
... maybe an example manipulating SQL lite?
@fire23hummer
@fire23hummer 2 жыл бұрын
Video about pagination
@muhammedhassan9236
@muhammedhassan9236 22 күн бұрын
best php channel imo
@onwubikojedidiahsolomon4429
@onwubikojedidiahsolomon4429 Жыл бұрын
Thank you dave you helped me
@Kondwani_simwanza
@Kondwani_simwanza Жыл бұрын
This the best tutorial on php. Good and straight to the point explanation
@achmaliki8389
@achmaliki8389 Жыл бұрын
mysqli_report(MYSQLI_REPORT_OFF);
@Kondwani_simwanza
@Kondwani_simwanza Жыл бұрын
Is this a question ?@@achmaliki8389
@Skilital
@Skilital Жыл бұрын
Thank you so much for this awesome tutorial!
@CC-rx7kt
@CC-rx7kt Жыл бұрын
Thank you so much sir. This helped me a lot.
@user-ki2gz3pj3n
@user-ki2gz3pj3n 6 ай бұрын
I really appreciate your work ....
@okilulbary1581
@okilulbary1581 Жыл бұрын
just wow, keep going. ❤
@dayzrespite
@dayzrespite Жыл бұрын
thank you so much for your content! It was great!
@ackinito
@ackinito 10 ай бұрын
Fantastic tutorial!
@oneangelartyz1090
@oneangelartyz1090 Жыл бұрын
thank you very much! really helpful
@po9572
@po9572 Жыл бұрын
thank you very much for this!
@mohdnaseemhashmi5457
@mohdnaseemhashmi5457 Жыл бұрын
Very helpful. Thank you
@shewmonohoto
@shewmonohoto 10 ай бұрын
Lifesaver! Thank you!!!
@assiaissou1003
@assiaissou1003 Жыл бұрын
This is super informative
@Shams_
@Shams_ Жыл бұрын
This video is like a hidden gem!
@zainkhalid3670
@zainkhalid3670 10 ай бұрын
Thank you very much for this. Thanks for also teaching us how to avoid SQL attacks or client-side bypasses. I've subscribed to your channel and can't wait to see more of your content. I've one question that how can I ensure that the email actually exists and is not a made-up email. I will also appreciate if you made video on how to sign up using google or apple account.
@mademen3804
@mademen3804 5 ай бұрын
wow, simple and precise
@yatakitombi3965
@yatakitombi3965 Жыл бұрын
I like this tutorial because it's will explained on what happening on codes and step by step and simple
@rshekhar11
@rshekhar11 Жыл бұрын
just one word for this video: awesom, by the way dave could you please add forgot password and email verification process if possible.
@AbdessamadBelm
@AbdessamadBelm 2 жыл бұрын
Amazing video,Just in the time
@dave-hollingworth
@dave-hollingworth Жыл бұрын
Part 2: PHP Password Reset by Email is here: kzbin.info/www/bejne/iGrFl6epbr95oNU
@ousainoubanja2696
@ousainoubanja2696 8 ай бұрын
It's not working for me and am copying thesame
@dave-hollingworth
@dave-hollingworth 8 ай бұрын
@@ousainoubanja2696In what way isn't it working?
@adeelmeer3244
@adeelmeer3244 Жыл бұрын
I tNice tutorialnk you speak for a good portion of us.
@andreivlaicu51
@andreivlaicu51 11 ай бұрын
Very good. Thank you!
@Johan_tube
@Johan_tube Жыл бұрын
Awesome 🎉 lesson. Cool knowledge.
@samuelkorede5100
@samuelkorede5100 Жыл бұрын
Also thanks for the video it really helps
@doso1083
@doso1083 Жыл бұрын
BEST TUTORIAL
@user-hj5xj6pq5o
@user-hj5xj6pq5o 10 ай бұрын
great explanation........salute!
@pivotai525
@pivotai525 Жыл бұрын
Amazing really!
@segaran
@segaran 9 ай бұрын
Great. Thanks brother. Awesome content. I am amazed at the speed you type the codes.😳
@dave-hollingworth
@dave-hollingworth 9 ай бұрын
Thank you! There might be some editing tricks in there ;-)
@segaran
@segaran 9 ай бұрын
that is good. we learned all the important concepts as quickly as possible because of the editing. @@dave-hollingworth
@jonathanmotivational7036
@jonathanmotivational7036 Жыл бұрын
Well simplified
Login and Registration Form in PHP and MySQL
56:17
AUZ Tutorials
Рет қаралды 292 М.
ОДИН ДЕНЬ ИЗ ДЕТСТВА❤️ #shorts
00:59
BATEK_OFFICIAL
Рет қаралды 7 МЛН
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 3,9 МЛН
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 183 МЛН
REST API with PHP and MySQL | Full Slim PHP Micro Framework Tutorial
50:01
Send email with PHP | Create a Working Contact Form Using PHP
10:18
Dave Hollingworth
Рет қаралды 128 М.
PHP Password Reset by Email
20:56
Dave Hollingworth
Рет қаралды 47 М.
Generate a PDF with PHP
19:17
Dave Hollingworth
Рет қаралды 57 М.
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 396 М.
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 35 МЛН
Secret Wireless charger 😱 #shorts
0:28
Mr DegrEE
Рет қаралды 2,2 МЛН
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 274 М.