How to verify email with a verification code - PHP & MySQL

Поділитися
Вставка
  • Опубліковано 1 лис 2024

КОМЕНТАРІ • 215

  • @fiqq_riz_
    @fiqq_riz_ 10 місяців тому +1

    Great video! I tried but it catches error. It says Uncaught PHPMailer\PHPMailer\Exception: SMTP Error: Could not connect to SMTP host. Failed to connect to server in ... Can you help? Thank you in advance

    • @AdnanAfzal565
      @AdnanAfzal565  10 місяців тому

      It means your SMTP email and password are incorrect. Try this new method: ua-cam.com/video/MP-QGUaxAno/v-deo.html

  • @johnhowellatienza5590
    @johnhowellatienza5590 2 роки тому +2

    I encountered an error Warning require(vendor/autoload.php): failed to open stream: No such file directory in C:\xampp\htdocs\. Although I have already a vendor folder and phpmailer folder. What should I do bro? Please can you help me?

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому +1

      Try running "composer update" on root folder of project.

    • @charles_coloso
      @charles_coloso 9 місяців тому +1

      composer dump-autoload

  • @raudhiatulridwan4821
    @raudhiatulridwan4821 9 місяців тому

    Hello, Adnan!
    I have some question for this tutorials.
    What is the password for login after register, the random password from database? or password that I used it from registered? bcs I cant use any password for login, so I stuck with "Password is not correct."
    Thanks, Adnan!

    • @AdnanAfzal565
      @AdnanAfzal565  9 місяців тому

      Check your spellings. Make sure that capslock is turned off.

  • @SalohiddinAbruyev
    @SalohiddinAbruyev Рік тому +1

    Thank you for your hard work, it works on my local computer but it doesn't work when I put it on the hosting, please help me

  • @delalxndr
    @delalxndr 7 місяців тому

    Hi Adnan, I already typed the correct host name, username and my database name in the mysqli_connect part but the values does not enter my users table. Do you know what could be the problem here? And thanks for the video

  • @fulhamfulham3852
    @fulhamfulham3852 2 роки тому +1

    Message could not be sent. Mailer Error: SMTP Error: Could not authenticate
    and I enabled less secure apps for gmail.. it's not working..

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому +1

      Gmail has disabled less secure apps. I am searching for an alternative. Will upload a new video once found a solution.

  • @ocwmmimaura3250
    @ocwmmimaura3250 2 роки тому +2

    hey bro, it can't connect to the database

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Make sure you are entering correct host, port username and password

  • @yuhantho287
    @yuhantho287 7 місяців тому

    Hi Adam, my checking password function on the sign-in page is not functioning. It just shows "wrong password" even i entered the correct one. but the username can check whether is right or wrong. Do you know how to solved it?

    • @AdnanAfzal565
      @AdnanAfzal565  7 місяців тому

      Is your password encrypted in database ? If yes, then make sure you are not checking the password in plain text. You need to check the password by decrypting etc

    • @yuhantho287
      @yuhantho287 7 місяців тому

      Hashed Password from Database: omg123
      Password is not correct
      even though i add code to show the password that store in database, is the same what i entered but still show "password wrong"

  • @gedefayesemahegn3389
    @gedefayesemahegn3389 3 роки тому +1

    Message could not be sent. Mailer Error: SMTP Error: Could not authenticate. How to solve this problem? please help me?

    • @AdnanAfzal565
      @AdnanAfzal565  3 роки тому

      Make sure you have entered the correct email address and password. And also make sure you have enabled less secure apps from here: myaccount.google.com/lesssecureapps

  • @munaalazzawi575
    @munaalazzawi575 Рік тому

    hi adnan
    hope you are well
    i dont know how to install the phpmailer to the computer?? when you open the black window i mean ?
    and would you please tell me if there is any risk of installing it ??
    regards :)

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому

      No. There is no risk.

    • @munaalazzawi575
      @munaalazzawi575 Рік тому

      @@AdnanAfzal565 and how to install it
      I download the zip file where should i put it the C !! And is there any additional steps to be done!!

  • @larryaj1174
    @larryaj1174 10 місяців тому

    Pls how do i make it function for "request another otp if you didn't recieve any"? Just incase a staff didnt recieve the otp at first.

    • @AdnanAfzal565
      @AdnanAfzal565  10 місяців тому

      You can use setTimeout function to send another OTP after 30 seconds etc.

  • @qoutetastic
    @qoutetastic Рік тому

    hello sir i have a error saying Attempt to read property "email_verified_at" on null

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому

      This is because the user record is not found.

  • @mae7381
    @mae7381 3 роки тому

    Can u help me? It shows “class ‘PHPMailer/PHPMailer/PHPMailer” not found in my directory

    • @AdnanAfzal565
      @AdnanAfzal565  3 роки тому

      Try installing PHPmailer with composer.

  • @yashpandey5688
    @yashpandey5688 2 роки тому +1

    Hi Adnan, Thanks for the tutorial..
    I'm getting this error:
    Message could not be sent. Mailer Error: SMTP Error: Could not connect to SMTP host.

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому +1

      Check if your email and password are correct. And make sure you have enabled less secure apps for gmail.

    • @yashpandey5688
      @yashpandey5688 2 роки тому

      @@AdnanAfzal565 Thanks, It Worked!!

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      You are welcome

    • @chandarayi5673
      @chandarayi5673 2 роки тому

      @@AdnanAfzal565 Google has no longer allow less secure apps right?

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      @@chandarayi5673 Yes. You can follow this now: adnan-tech.com/hosting-email-address-send-smtp-email-in-php/

  • @User-is2kf
    @User-is2kf 3 роки тому

    can this still work if i don't have a live website? i just have php login page and a databse

  • @rafhaellowixhomwad
    @rafhaellowixhomwad Рік тому

    im getting this error, Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.

  • @davecarljay-arerodolfo9612
    @davecarljay-arerodolfo9612 Рік тому

    how do i fixed this??
    Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому

      It means that your email or password is in-correct.

  • @KopterHUN
    @KopterHUN Рік тому

    hi i have one problem coursephp inessega dont work

  • @bahbrahim711
    @bahbrahim711 2 роки тому

    i dodn't understand how to run the command, isn't there a way to download the php mailer folder with everything on it i am very confused
    and frustrated,, can you provide the folder with everything in place

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      You can download the complete source code from link in the description.

    • @bahbrahim711
      @bahbrahim711 2 роки тому

      @@AdnanAfzal565 its not about the source i'm talking about the phpmailer folder on the code it says use PHPMailer\PHPMailer\PHPMailer; but there is not second or third PHPmailer there

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      @@bahbrahim711 Run the following command at the root of your project:
      composer require phpmailer/phpmailer

    • @bahbrahim711
      @bahbrahim711 2 роки тому

      @@AdnanAfzal565 thx for replying, it's all setup now but it gives this err Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.

  • @jairocapua2956
    @jairocapua2956 Місяць тому

    Can't download the source code. it says file wasn't available on site

    • @AdnanAfzal565
      @AdnanAfzal565  Місяць тому

      Let me re-upload the file.

    • @jairocapua2956
      @jairocapua2956 Місяць тому

      @@AdnanAfzal565 ok thank you so much. I'm studying php right now and I found your channel. Thanks for the help! ☺️

    • @AdnanAfzal565
      @AdnanAfzal565  Місяць тому

      Thank you. That's great to hear. The file has been uploaded. Please refresh the page and try downloading again.

  • @makoystv6971
    @makoystv6971 3 роки тому

    Message could not be sent. Mailer Error: SMTP Error: Could not authenticate. How?

    • @makoystv6971
      @makoystv6971 3 роки тому

      im getting this error, sorry im not good at programming

    • @AdnanAfzal565
      @AdnanAfzal565  3 роки тому

      You need to check your email and password.

  • @nalinakshicr9900
    @nalinakshicr9900 4 місяці тому

    I am getting error in email_verification 27th line required error

    • @AdnanAfzal565
      @AdnanAfzal565  4 місяці тому

      Can you paste the complete error here ?

  • @preyumkumar7404
    @preyumkumar7404 2 роки тому +3

    Bro this video is awesome helped me to generate email otp in my project easily... great video :-) ❤️❤️

  • @taetae_.95
    @taetae_.95 8 місяців тому

    Can anyone tell me Vendor folder should be at which location

    • @AdnanAfzal565
      @AdnanAfzal565  8 місяців тому

      It should be at your root location.

  • @evc_scooter
    @evc_scooter 2 роки тому +1

    (I'm french)
    Hi Adnan,
    I get this error : Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.
    My email and my password are the good.
    Can you help me please ?
    PS: I don't use google translate :)

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      You need to enable "enable less secure apps" option using this link:
      myaccount.google.com/lesssecureapps

    • @evc_scooter
      @evc_scooter 2 роки тому

      @@AdnanAfzal565 I do it , but the same error occured

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      @@evc_scooter Make sure there are not spelling mistakes or no white spacing etc in the email or password.

    • @evc_scooter
      @evc_scooter 2 роки тому

      @@AdnanAfzal565 thank you so much my email had a spacing

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      @@evc_scooter You are welcome.

  • @normanchew8380
    @normanchew8380 2 роки тому

    i encounter another problem where i cant see the details in the database , it looks like invisible ( when I create manually to test , there is missing in the order of numbers

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Can you show any screenshots etc ?

    • @normanchew8380
      @normanchew8380 2 роки тому

      @@AdnanAfzal565 i managed to solve it thanks , it was my database config

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      @@normanchew8380 Great.

  • @pavithrabhat5062
    @pavithrabhat5062 3 роки тому

    "Message could not be sent. Mailer Error: SMTP Error" getting this error, my email and password are correct. Please help.

    • @AdnanAfzal565
      @AdnanAfzal565  3 роки тому

      Make sure you have entered correct email and password.

    • @preyumkumar7404
      @preyumkumar7404 2 роки тому +2

      google accounts need to enable login with low secure apps option in their security settings to work with this settings. happened with me too

    • @pavithrabhat5062
      @pavithrabhat5062 2 роки тому

      @@preyumkumar7404 thanks

  • @AngeloCastro-xg3ci
    @AngeloCastro-xg3ci 7 місяців тому

    why i encounter password is not correct? how will i fix this one?

    • @AdnanAfzal565
      @AdnanAfzal565  7 місяців тому

      The password must be incorrect. Check your spellings and caps lock.

  • @angelosampang
    @angelosampang 2 роки тому

    Hello is this gonna work if I want my website to apply it in a web hosting?

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Yes. It will work.

    • @angelosampang
      @angelosampang 2 роки тому

      @@AdnanAfzal565 Really?? Thanks a lot bro for replying. I've been asking many creators about this but your the only one who replied.

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      No problem. Let me know if you face any problem in your hosting.

  • @shraddhabansode8599
    @shraddhabansode8599 Рік тому

    It is 100 % working. This video was really very helpful for me

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому +2

      Glad to hear that.

    • @larryaj1174
      @larryaj1174 10 місяців тому

      ​@@AdnanAfzal565how can I make them request for an otp code if they didn't get it at first...can you just make that line of code for me please.

  • @ahmedal-akhali328
    @ahmedal-akhali328 Рік тому

    I have already done the app password form Google account, and now I got this error
    Fatal error: uncaught_mysql_execution: Not connection could be made because the Machine refused it
    The error on line 67 where the local host = 8889, 'root',........

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому

      It means that your MySQL server has stopped running.

  • @rizkialiffiyyanto702
    @rizkialiffiyyanto702 2 роки тому

    Kodingan kita sudah harus naik di hosting ya supaya running?

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Anda dapat mengujinya di localhost juga.

  • @selineluatalop1863
    @selineluatalop1863 2 роки тому

    Hi Adnan, I need help on this
    Message could not be sent. Mailer Error: SMTP Error: Could not connect to SMTP host

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Make sure your gmail and password is correct and “less secure apps” are enabled.

  • @ellanashadeed2605
    @ellanashadeed2605 2 роки тому

    why not send any thing in my gemail?

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      It is a limitation from email clients.

  • @markatienza7940
    @markatienza7940 Рік тому

    How can I add a session in the code?

  • @devicharandasari3051
    @devicharandasari3051 10 місяців тому

    Undefined type 'PHPMailer\PHPMailer\PHPMailer'. this message coming can u help me?

    • @AdnanAfzal565
      @AdnanAfzal565  10 місяців тому

      It means your PHPMailer library is not included. Try check the file path.

    • @devicharandasari3051
      @devicharandasari3051 10 місяців тому

      @@AdnanAfzal565bro flie path is correct.Then also same error is coming

  • @oyewalephilip9113
    @oyewalephilip9113 2 роки тому +2

    Thanks Adnan, this helped me in a project.

  • @t.e.aravindhanstudent-mca9074
    @t.e.aravindhanstudent-mca9074 3 роки тому

    I cant register login in Anand tech

    • @AdnanAfzal565
      @AdnanAfzal565  3 роки тому

      What error are you having ? Can you show screenshot ?

  • @daleandrew6253
    @daleandrew6253 2 роки тому

    the verify button didnt work pls help

  • @techtadse
    @techtadse Рік тому

    Working on xammp but not a work live server hosting

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому

      What error are you having ?

    • @techtadse
      @techtadse Рік тому

      @@AdnanAfzal565 email are received on use xammp but use live hosting not received mail

  • @jayveesias7036
    @jayveesias7036 3 роки тому

    The link cannot be accessed.

  • @jolieousbejasa6315
    @jolieousbejasa6315 Рік тому

    Hello, the email are not sending pls help

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому

      Make sure your SMTP configurations are correct.

  • @imperial-x9899
    @imperial-x9899 2 роки тому

    smtp shut down now ........ gonna need alternative now can u help sir?

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Yes, you can follow this: adnan-tech.com/hosting-email-address-send-smtp-email-in-php/

    • @imperial-x9899
      @imperial-x9899 2 роки тому

      @@AdnanAfzal565 hello your website login register input is not working, so no can register or login sir..

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      You need to double check your email and password for login. Or reset.

  • @ezrakeeps
    @ezrakeeps 3 роки тому +1

    Can you make a node js project?

  • @ahmedadwan
    @ahmedadwan 2 роки тому

    Nice video, How you write code like that word by word.

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому +1

      Thanks. What do you mean by “word by word” ?

    • @ahmedadwan
      @ahmedadwan 2 роки тому

      @@AdnanAfzal565
      The code is written automatically in sublime?, or do you write it with your own hands, that is what i mean.

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому +1

      I edited the part where I misspell the variables and while thinking the next code. I remove that part from the video using iMovie.

  • @holdtightmydan
    @holdtightmydan Рік тому

    I'm struggling to write a line that checks to see if the email is already activated, as at present when the email is already activated it just displays, verification code failed, I want it to check if activated = '1' to display this account is already activated.

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому

      You can fetch the user from database using his email only. Then use the condition in php:
      if($user->activated == “1”) {
      }

  • @katlinsage9371
    @katlinsage9371 2 роки тому

    *Does this tool require smtp.?*

  • @qoutetastic
    @qoutetastic Рік тому

    Hello sir it's still working?

  • @rizkialiffiyyanto702
    @rizkialiffiyyanto702 2 роки тому

    Bang mau nanya lebih lanjut, ada kontak yg boleh di hubungi?

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Tentu, Anda dapat mengunjungi di adnan-tech.com. Dan ada widget obrolan di kanan bawah.

  • @livymarilyn509
    @livymarilyn509 2 роки тому

    Very functional bro to send campaign emails.

  • @ClumsyStephut
    @ClumsyStephut 10 місяців тому

    is it still working?

  • @okok-j4c8h
    @okok-j4c8h Рік тому

    Nice video , could you bro make a video using an API its more secure

  • @gamermaster9876
    @gamermaster9876 Рік тому

    Thank you

  • @oyamele8628
    @oyamele8628 Рік тому

    very interesting it worked for me pretty fine.

  • @shrikantjadhav1053
    @shrikantjadhav1053 3 роки тому

    Please give source code

  • @crickshowshorts
    @crickshowshorts 10 місяців тому

    please tell me how to add php mailer

    • @AdnanAfzal565
      @AdnanAfzal565  10 місяців тому +1

      You can get it from here: github.com/PHPMailer/PHPMailer

  • @ZGDX_Smiling070
    @ZGDX_Smiling070 2 роки тому

    next time pls add music and effects to your video it was great but really boring and less intriguing

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Sure. Will keep that in mind. Thank you for suggestion.

  • @oriaburehopeeromhosele883
    @oriaburehopeeromhosele883 3 роки тому

    Can I rent you to work for me and I will pay you?

    • @AdnanAfzal565
      @AdnanAfzal565  3 роки тому

      Sorry, right now I am not doing freelance work.

    • @skeletonroast3614
      @skeletonroast3614 3 роки тому

      You can hire me I will surely do your work

  • @235gajeraankita8
    @235gajeraankita8 Рік тому

    how to enable enable "enable less secure apps" ?

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому +1

      This method is no longer works for Gmail. You will not find this option now.

  • @parvanehsalary1745
    @parvanehsalary1745 2 роки тому +1

    good

  • @diroshandino8139
    @diroshandino8139 3 роки тому

    Please send i phone settings

    • @AdnanAfzal565
      @AdnanAfzal565  3 роки тому

      You want to verify with SMS ?

    • @diroshandino8139
      @diroshandino8139 3 роки тому

      @@AdnanAfzal565 gamil la bro spam la verify code varala bro

  • @kriptoedits9978
    @kriptoedits9978 3 роки тому

    Nice

  • @jirax7144
    @jirax7144 2 роки тому

    Nice thank you

  • @swipe9456
    @swipe9456 2 роки тому

    6:20

  • @johnvincentalmonia8880
    @johnvincentalmonia8880 2 роки тому

    Please help me "Warning: require(vendor/autoload.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\EmailVerification
    egister.php on line 7"

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому +1

      You need to run the following command:
      > COMPOSER_MEMORY_LIMIT=-1 composer update

    • @johnvincentalmonia8880
      @johnvincentalmonia8880 2 роки тому

      @@AdnanAfzal565 Where I can see this one sir? I really need this program for my school project. Can you make a video or tutorial how to solve this problem?

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому +1

      @@johnvincentalmonia8880 You need to open the command prompt or CMD or terminal (Mac) in the main folder of your project. And then run that command.

    • @johnvincentalmonia8880
      @johnvincentalmonia8880 2 роки тому

      @@AdnanAfzal565 Message could not be sent. Mailer Error: SMTP Error: Could not authenticate. How about this one? What or where do you think my error?

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      @@johnvincentalmonia8880 it is because your email and password does not match. Or make sure you have enabled less secure apps for your gmail account.

  • @YOGESH-j9r
    @YOGESH-j9r 7 місяців тому

    Warning: require(vendor/autoload.php): Failed to open stream: No such file or directory in C:\Users\Dell\OneDrive\Desktop\just yogesh stuff\CONTROL\htdocs
    ew
    egister.php on line 9
    Fatal error: Uncaught Error: Failed opening required 'vendor/autoload.php' (include_path='C:\Users\Dell\OneDrive\Desktop\just yogesh stuff\CONTROL\php\PEAR') in C:\Users\Dell\OneDrive\Desktop\just yogesh stuff\CONTROL\htdocs
    ew
    egister.php:9 Stack trace: #0 {main} thrown in C:\Users\Dell\OneDrive\Desktop\just yogesh stuff\CONTROL\htdocs
    ew
    egister.php on line 9
    plz broo

    • @AdnanAfzal565
      @AdnanAfzal565  7 місяців тому

      Run command: "composer update" at the root folder.

  • @ItsMeMargo-k9c
    @ItsMeMargo-k9c Рік тому

    i got this error please help "Message could not be sent. Mailer Error: SMTP Error: Could not authenticate." i tried any possible things even all your suggestions in comments but still not yet.🥲

    • @AdnanAfzal565
      @AdnanAfzal565  Рік тому

      Go to your gmail settings and enable 2FA. From there, you can get an app password. Use that password instead of your gmail actual password.

  • @ibrapro1031
    @ibrapro1031 2 роки тому

    Please help: Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Please double check your email and password. Also make sure the “less secure apps” are enabled for that gmail account.

    • @ibrapro1031
      @ibrapro1031 2 роки тому

      @@AdnanAfzal565 I have checked they are correct and im not using gmail im using outlook

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      Then make sure the port number and encryption type “ssl” or “tls” is correct.

    • @ibrapro1031
      @ibrapro1031 2 роки тому

      @@AdnanAfzal565 so what should the code bee if you can send me thx for answering

    • @AdnanAfzal565
      @AdnanAfzal565  2 роки тому

      The port should be 465. And the encryption must be “tls”. That should work.