• Wednesday , 18 October 2017

9. Forgot Account Password Form Email Script Ajax PHP MySQL Tutorial

Code Canyon



Lesson Code: http://www.developphp.com/video/PHP/Forgot-Account-Password-Form-Email-Script-Ajax-Tutorial Learn to program an Ajax PHP MySQL Forgot …

Original source

3d Ocean

Related Posts

34 Comments

  1. Deepak Sahu
    September 13, 2017 at 10:13

    Very Nice Tutorials Mr. Adams K thanks a lot..

  2. vitek klima
    September 13, 2017 at 10:13

    hi adam I have problem with login.
    this spell.

    Notice: Undefined variable: db_conx in C:xampphtdocschatuser.php on line 19

    Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:xampphtdocschatuser.php on line 19

    Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in C:xampphtdocschatuser.php on line 21

  3. Thomas Williams
    September 13, 2017 at 10:13

    Good tutorial but I would advise against telling them when they get a wrong email. Otherwise people could use this system to find out what emails are on the system, and which ones are valid and not valid. It helps the hackers. Best to give a message to say the email has been sent, but not give away if the email is really on the system.

  4. Adem Ö
    September 13, 2017 at 10:13

    I copy/pasted everything into a new .php-file named "forgot_pass.php".

    I changed the sql strings and such to fit my exact tables .. however, when I click the button "genere tem log in password" nothing happens at all.

    What do I do?

    Also, how do I connect to my very own Database? I see db_conx but I'm not sure what to do with it.
    I have a dbconnect.php file, where I can connect to my DB. How do I implement it?

  5. sundeep amrutia
    September 13, 2017 at 10:13

    hello adam i am getting an message unknown error occur when pressing the generate button.. what might be the problem? can any one help," but the mail is sent by the system…"

  6. Jack Jill
    September 13, 2017 at 10:13

    Works perfectly till now. only problem is receiving the emails but I understand it is due to the SMTP not being available on my localhost. but soon i will migrate to a hosting service. and hopefully everything works fine.

  7. Naga
    September 13, 2017 at 10:13

    Wanted to say that you rock Adam! Thank you so much!

  8. Naga
    September 13, 2017 at 10:13

    for me the unknown error was caused by having the page named /forgot_password.php and not /forgot_pass.php

    It fixed all my errors. I guess my mind defaulted to naming it the way I did.

  9. Fatlind Bytyqi
    September 13, 2017 at 10:13

    But how to open the first program? Somebody please help me.

  10. Dillon Burnett
    September 13, 2017 at 10:13

    Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result
    Warning: Cannot modify header information – headers already sent by (line 56-58)

  11. Paul Farley
    September 13, 2017 at 10:13

    Thanks for the tutorial Adam.
    +Adam Khoury I cannot get this to even begin doing anything. I created the useroptions table. I want to note this first as I am not sure if it is causing this. I put all of your code into my file name called forgotpassword.php. I modified all of your code to reflect that. I did not put your <script src="js/main.js"></script>
    <script src="js/ajax.js"></script> files in mine as I am not sure what those contain or where to locate them. It seems like my issue starts right from the beginning. I enter the email adress and then click the generate temporary password button and nothing happens at all. What would be causing this??

  12. GalacticTax28
    September 13, 2017 at 10:13

    It's weird because Google put an add about dogs in the beginning of the video, and then he said what;'s up doggies.

  13. Peter M. Souza Jr.
    September 13, 2017 at 10:13

    thanks for the feature, this is SUPER handy for those lazy or forgetful people

  14. Alcides Murillo
    September 13, 2017 at 10:13

    Man I am about to giving up on this page. I keep on getting no where with it. Now I get the link on my email but when I click on it. It gives me the error messages there is no match for that user and temporary password. Can anyone help

  15. Sonny M
    September 13, 2017 at 10:13

    Thank you for all your informative lessons. learned a lot!

  16. Jeremiah Tenbrink
    September 13, 2017 at 10:13

    Adam Khoury,

    Just wanted to say thanks for the videos, I've learned a lot by following along your series.

    I am having a issue with this code however. I've gone through the code line by line and I'm pretty sure I understand it however for some reason when I click on the Generate temporary password button all I get is please wait. It never goes any further. I never have a temporary password created in my db. Some assistance would be greatly appreciated.

  17. DINEROA DIARIO
    September 13, 2017 at 10:13

    Works perfect ! 🙂

  18. Marica Adrian
    September 13, 2017 at 10:13

    Can somebody tell me why do i get error when i try to connect to the page ? it's saysLogin unsuccessful, please try again.

  19. IceD626
    September 13, 2017 at 10:13

    I dont receive the Temporary Password email, even though i get 'success' (Step 2. Check your email inbox in a few minutes You can close this window or tab if you like.) when i click the button. I checked the code but everything it seems to be ok. btw I do receive activation email sent by signup.php and i copied the mail structure from that and i paste it in my file but still doesnt work. can anyone help me?

  20. phil mingo
    September 13, 2017 at 10:13

    where are the main.js and ajax.js files??

  21. Lee Lee
    September 13, 2017 at 10:13

    where did you learn this, i cant seem to find anyone to teach me php. i am in london now and the only college thats teachs php, only teaches for 4 weeks 2 hours every week, but i want to learn php so please tell me how you knew to play with php as good as u do. did u get taught and where please

  22. Cheap Cars Finder App - Autopten
    September 13, 2017 at 10:13

    Thanks Adam, it works perfect! Just one little thing I'd change or improve would be, when you enter a non-existing email, you get the status "Sorry that email address is not in our system", and the "Generate Temporary Log In Password" BUTTON disappears, but it doesn't come back. It may confuse the user. So I added:
     _("forgotpassbtn").style.display = "block";
    Before:
    _("status").innerHTML = "Sorry that email address is not in our system";
    So it shows the error message, and the submit button too.

  23. Ogechi Ebere
    September 13, 2017 at 10:13

    You Rock Adam!!!

  24. Bob Smith
    September 13, 2017 at 10:13

    I click on the "generate temp password" and it does nothing…..what's up with that?

  25. Piotr Domagała
    September 13, 2017 at 10:13

    I've got the same problem: "Unknown Error has occured". I also receive an e-mail with temp pass but the link to activate temp_pass as a main password doesn't open. Anybody knows how to fix it?

  26. Jake G
    September 13, 2017 at 10:13

    I'm getting the "Unknown Error has occured" too. Although the temp password gets created and the email link swaps the password just fine. Anyone know what might be the problem?

  27. tangolobo
    September 13, 2017 at 10:13

    Really enjoying these tutorials Adam…  learning tons from ya dude.  Thank you very much for putting this video series together.

  28. Alamine
    September 13, 2017 at 10:13

    Adam, you the best out of the rest. Thanks for all your tutorial series.

  29. Rainer Brunotte
    September 13, 2017 at 10:13

    Hi Adam, thanks so much for this tutorial series! I now encountered the same problem as Ayush Sharma: "after I have click the email link of temporary password , it tells login unsuccessful, with new password but I can login with my old password". I checked in mysql myadmin that the temp pass is successfully generated in the useroptions table, and successfully gets deleted upon clicking the email link, however the original password from users table remains and does not get "overwritten" … please help? Thanks so much!

  30. John Yngson
    September 13, 2017 at 10:13

    Hi Adam can you help me to create a change password system connecting to this tutorials.. thanks 🙂

  31. Tixo Tixopona
    September 13, 2017 at 10:13

    For those having problems when being redirected from the email to forgot_pass.php [i.e. the page remains blanck not redirecting to login.php]: I made a separated forgot_pass_activation.php to process the temporary password activation. It seems to have solved the problem. (I copied the entire code for // EMAIL LINK CLICK CALLS THIS CODE TO EXECUTE in the forgot_pass_activation.php and updated the link in the $msg variable ). 🙂

  32. SuperFracking
    September 13, 2017 at 10:13

    woah. a few years ago i was looking at code while inspecting an element. It made no sense. I thought the symbols and letters had no meaning. Now, after beginning to learn code it all clicks in. It makes so much sense. Code is so so so cool i feel like i could spend hours and hours and days just making a website… 😀

  33. slyfox9
    September 13, 2017 at 10:13

    Refer to video 7

  34. slyfox9
    September 13, 2017 at 10:13

    I am guessing in your signup page, you still have the password being encrypted with crypt. he changes it to md5 in this video so make sure you change it as well.

Leave A Comment

You must be logged in to post a comment.