How To Create A Forgotten Password System In PHP | Password Recovery By Email In PHP | PHP Tutorial

preview_player
Показать описание
In this PHP tutorial you will learn how to create a forgotten password system in PHP. To follow this tutorial you only need to have basic knowledge in PHP and a login system ready. We will be creating our password recovery system using PHP tokens which is a method we use to authenticate the correct users who try to reset their password.

➤ CHAPTERS

(00:00:00): Introduction
(00:00:31): Ways to make a Password Recovery system
(00:03:51): What is a token?
(00:04:50): Why PHP e-mails sometimes doesn't work
(00:06:33): Demo of what we are going to build
(00:09:51): Creating the "Recover password request" HTML form
(00:15:55): Creating the Token PHP script & database table
(00:42:18): Creating the Password Recovery e-mail
(00:50:48): Creating the "Reset password" HTML form
(01:24:22): Testing our Password Recovery system!

➤ OTHER LINKS

➤ HOW TO FIX ERRORS YOU MIGHT GET

▸"Mail doesn't send"
This is very likely caused by you not having a mail server running that makes it possible to send emails using the build-in PHP mail() function. Fix this issue by setting up a mail server. I have provided links for this here in the video description. If you have a mail server running then check your code for errors.

▸"unexpected"
You made a typo in your code. Probably by forgetting to close something. Did you already check for any mistakes in your code? Well check again because it's there somewhere :)

▸"HTTP ERROR 500"
HTTP ERROR 500 is a server error, meaning that you are most likely using an outdated version of apache or mysql. Try updating your servers and make sure that you are using the latest version of PHP.

➤ GET ACCESS TO MY LESSON MATERIAL HERE!

First of all, thank you for all the support you have given me!

I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!

I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.

I hope you will find it helpful :)

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

I managed to get my first job as a web developer after an internship and I owe you a lot, man. Your tutorials are clear, clean, and very useful.

halim
Автор

37:29 Two things:
- Instead of echoing the message and using exit(); after you should just use die("insert message here");
- After the if statement, you could just remove the else statement due the command inside the if statement, because if there is infact an error it will stop the script thus being useless to make an else and just continue the script normally

Besides that loved it!

SkyLinerPT
Автор

I have spent hours trawling through the many YouTube tutorials on how to set up a login system using php. This is by far the most useful and comprehensive presentation. Very easy to follow. You clearly have a great depth of knowledge. When I first saw the tutorial duration of over an hour I was hesitant. You had me captured for the full extent of the course. Hats off to you mate.

alanwilliams
Автор

Ideas for next tutorials..
*Adding security questions
*PHPMailer
*CURL
*PHP Forum
*SMS API (sms tokens)

I like your videos..keep it coming

hrithik
Автор

Thanks teacher
I really appreciate you and your tutorials.

alphagaming
Автор

For anyone getting the issue --- PHP Fatal error: Uncaught Error: Call to undefined function mysqli_stmt_get_result() --- You have to have the PHP extension "nd_mysqli" enabled. Took me a while to figure this out. Hope this helps save someone time~!

mikemaer
Автор

*I was waiting for this episode. I made a **_Signup_** and **_Login_** system by watching your previous video. I have also watched the whole playlist of PHP but couldn't understand one video where you explained **_How to upload and change profile picture._** Could you please make another video on that? Thank you for your all efforts and time. Learned a lot.*

ck
Автор

I 'actually' went through this twice, thoroughly. The first time as show, then I learned the OOP login system, then I went through this again and put it into the OOP paradigm. I did take some time from step to step to make sure I had it right, but it really wasn't too hard either. Thank you, it gave the codeholic in me a🙂 good fix and a good step forward.

andrewcuster
Автор

Such a great series of PHP tutorials. You are a great educator, thanks for doing this. Helped me immensely with my project.

mochasteak
Автор

woww..nvr seen such a quality content for free...hatss off.u rock daniel

gayathriramanesh
Автор

By far the most enjoyable tutorials on Youtube that I have experienced so far!
Your voice is also very nice to listen to, and you have a nice equipment. Also, glad that you're using a camera, so the courses feel more natural.
Your videos are helping me a lot in my CMS Website college project.

Looking forward to more videos from you! :)
Happy holidays!

prelogboy
Автор

You did this tutorial for me bro, , i have a reporting system that i developed using your tutorials, everything else works but i was stuck trying to figure out how to make reset password, , , u a freaking freaking genius, ,

iamtafara
Автор

My guy you are one of the best php teachers here on youtube.May Mudzimu bless you .

mudzimumudzimu
Автор

Great tutorials! And to give something back:
a) <br/> == break
b) bind is an irregular verb so => bind / bound / bound not "binded".
c) <> !== "pointy arrow thingies, they are called chevrons or angle brackets.
But really amazing tutorials! :D

BogdanTomasciuc
Автор

You almost started my new career in web development. Thank you so much and please do more videos like it

historymobile
Автор

I'm from Brazil and thanks to your videos, i got a job in PHP.

MarceloGomez
Автор

Great Lesson. I do have 3 questions on the parts you have made an in video notice:

58:13 - Note to the viewer - I forgot to close the php using ;

Is this correct (create-new-password.php):

<input type="hidden" name="selector" value="<?php echo $selector; ?>">
<input type="hidden" name="validator" value="<?php echo $validator; ?>">


Under Reset-password.inc.php

1:04:20 - Note to viewer - “This won’t work since the tokens aren’t included! Either include the tokens in the url, or just send them to the signup page and ask them to start over.”
Im not entirely straight in how to add the tokens in the url

1:08:52 - Note to viewer - Forgot to include $currentDate
I am not sure what I am supposed to do.

I have everything set. It is when I enter and confirm the new password and hit submit; it does not work.

AntoninoFotiNYC
Автор

25:20 isn't an hour 3600 seconds? 1800 seconds should be half an hour.

NIGHTMARE
Автор

This was perfect! I don't want to make a forget password system but instead I needed to know how to send and email by PHP with the click of a button. I am creating a sort of ticket system that will give users a reply via email.

Toxicblackmambahs
Автор

I've been waiting for this video for so long! thank you man, you're the best at teaching PHP.

angelrico