Hello readers, Today in this blog you'll learn how to create a Login & Signup Form with Email Verification using PHP and MySQL. Earlier I have shared a blog on How to configure XAMPP to send Mail from Localhost in PHP? If you haven't still read this blog, then I want to suggest you first read that blog and continue this because in that blog I've taught you how to configure XAMPP before sending mail from the localhost.
As we all know, the login and & Signup Form is the set of different input fields - Name, Email, Username, Password, etc. which are used to authenticate users before giving access to the site. In our program [log in & Signup Form with Email Verification], there are eleven PHP files and one is a CSS file means there are a total of twelve files in our user name folder.
At first, on the webpage, there is shown only a login form and inside the login form, there is signup now link to redirect the user to the first signup before login. When the user tries to log in without even signup the form, there is displayed an error message labeled as "It looks like you're not yet a member! Click on the bottom link to signup".
In the signup form, while the user is signing up, if he enters the same email, which already exists in our database then there is displayed an error message labeled as "Email that you've entered is already exist!". And when the user doesn't match two password combinations, there is also displayed an error message labeled as "Your confirm password not matched".
When the user filled up all the required inputs correctly, then a six-digit verification code number is sent to the user's email and he will be redirected to the OTP Verification page. If the user entered the wrong code, there is displayed an error message labeled as "You've entered incorrect code!". If the user exit the OTP verification code page without entered a valid or correct verification code and come to the login page to log in with the same email and password which he used to sign up, then he will be again redirected to the OTP page and there is displayed an info message labeled as "It looks like you've not verified your email".
When the user entered the correct verification code, then he will be redirected to the Home Page. On the home page, there is a navbar with a logo on the top left corner and the logout button on the top right corner. At the center of the home page, there is a welcome message with the name of the user which he entered while signing up for the form. And when the user clicked on the logout button, he will be redirected to the login page and at this time he can log in with their correct email and password and will be directly redirected to the home page without redirecting to any other page.
If you're feeling difficult to understand what I am saying. You can watch a full video tutorial on this program (Login & Signup Form with Email Verification).
Video Tutorial of Login & Signup Form with Email Verification
In the video, you have seen the demo of this project and I hope you love it. In this project, I have sent mail from Localhost using PHP and you must have to configure your XAMPP to Send Mail from Localhost in PHP. If you don't configure your XAMPP then your mail which is used to send OTP code to the user won't be sent and there is no meaning to download the source files of this project.
Login & Signup Form with Email Verification [Source Codes]
Click the given download button and you'll be redirected to the timer page, just wait until the timer completed. Once the timer complete then the zip file will automatically download. Once you download the zip file, just extract it and you'll get a folder with all required coding files with a userform.sql file. After these, create the database and the database name must be userform then import the userform.sql file by clicking on the import tab in the database. This file will create all required tables with columns. That's it you don't need to do anything more.
Lit!
ReplyDeleteThank you..Keep visiting.
Deletegood job bro
ReplyDeleteThank you bro
Deletewhats next after creating the table
ReplyDeleteCreate the php files and paste the following codes.
DeleteHello!
ReplyDeleteVery good tutorial!
Thank you...Keep visiting!
DeleteI also loved the tutorial bro!
DeleteWarning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in C:\xampp\htdocs\200\controllerUserData.php on line 19
ReplyDeletewhere is the mistake?
On line no.19
DeleteThanks much sir
ReplyDeleteYou're welcome.
Deletewhere to save this file ???
ReplyDeletei include all the files to a html file but nothibg works. how to make them works ??
ReplyDeletePlease learn some basic php before pasting these codes. You've to create php files not html files.
Deletehi can you make a video on how to connect thise codes and how to create a server like that reply me the link of the
ReplyDeletethank you
Okk..stay tuned with us!
Deletehow to open it in the browser
ReplyDeleteRead this article - https://www.quora.com/How-do-I-open-a-PHP-file-in-a-browser
Deletedude i want to add a city and institution also in registration form but i cant store values in the database
ReplyDeleteWhat's the error you're facing while inserting data's into database?
Deleteits saying failed to insert data into database
ReplyDeleteDatabase error please check the name of your database with the connection.php file.
Deletegood job
ReplyDeleteWhat is the step to take after downloading the files and programming Xampp ? Where should I place my php file in " How to configure XAMPP to send Mail from Localhost in PHP ?"
After downloading files just create a database, table, and columns with that names which are mentioned above and to configure XAMPP read this blog - https://www.codingnepalweb.com/2020/09/how-to-configure-xampp-to-send-mail-from-localhost-in-php.html
DeleteCan you please provide direct link of files becaz when i click link the timer did,nt start helo me sir!!
ReplyDeleteI'm sorry for that and now it has been fixed. Please download again from the same link.
Deletemy thing im working on only uses html is there a way to do this on html? like save the data?
ReplyDeleteNo with only html you can't!
Deleteand when i press the login button or the sign up botton it sends me to an error screen :o
ReplyDeleteWhat's the error?
Deletecan u plz make one tutorial for phpmyadmin??
ReplyDeleteSure stay tuned :)
DeleteThank you codingnepal amazing help
ReplyDeleteit doesnot send any email please help me
ReplyDeleteDid you configure your XAMPP ?
DeleteWarning: mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. 78sm5550625pfz.211 - gsmtp in C:\xampp\htdocs\Login and Signup Form with Email Verification - PHP\controllerUserData.php on line 33 (Failed while sending code)
ReplyDeletewhere the last php file should be save and with which name plz specify.
Create a php file inside the HTDOCS folder with .php extension and paste the following codes in this file then put the receiver email and sender email address in the mentioned fields.
DeleteHow do i upload the files i donwloaded to Adobe Dreamweaver?
ReplyDeleteYes text editors doesn't matter
DeletePlease share file database.sql
ReplyDeleteI've shared all required things in this blog. Please read carefully.
Deleteim a beginner complete beginner to php so just a question why isnt their any .html files like how would i see the form if theirs only .php files
ReplyDeleteYou've to install server to run .php file. You can google it for more info.
DeleteCan you share the source code of your website ??
ReplyDeleteIt looks very attractive and easy to use.
You can read our FAQ for this.
DeleteI think Coding Nepal bro has made his website in blogger.com.✅
Deletegood
ReplyDeleteThank you
DeleteWhat did you used ? blogger or wordpress for this site .
ReplyDeleteBlogger
Deleteshow form verify but no see code in email help me plz
ReplyDeleteI didn't understand
Deletenice work bro
ReplyDeleteThanks bro
DeleteThank you my lovely broo))
ReplyDeleteYou're welcome bro :)
DeleteSorry, failed while sending mail!
ReplyDeletewhy ?
what should be writ in receiver and sender in send_mail.php?
help phz i writ every thing you do
Did you configure XAMPP folder??
DeleteGood work bro
ReplyDeleteThanks bro
DeleteVery Useful Thanks
ReplyDeleteYou're welcome
DeleteHii,
ReplyDeletei have one error when i register new account it shows
"Failed while inserting data into database!"
i had check my database name but its correct so where is problem.
please help me to solve this error
Please contact me on Email or Insatgram.
DeleteHow to add push notification which says codingnepal wants to send you notification 1.allow 2. No thanks .
ReplyDeletePlease give code for that
Please read this FAQ
DeleteFailed while sending code!
ReplyDeleteI was trying to implement it in my hosting .But I am getting this error. But data perfectly saved in database,since I changed few necessary changes to connect with my hosting databases.Now my question is why I am facing this error?
please help me and thanks a lot for this great tutorial.
It's maybe there is some mistakes on variables, database name or something else.
DeleteNice
ReplyDeleteThank you :)
DeleteHi CodingNepal, on my computer it is not working, do u have a IDE for the PHP?
ReplyDeleteYou have install XAMPP server to run php file.
DeleteNice Job! But I have a problem it says "Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\controllerUserData.php on line 33" My code is the same as yours |Failed while sending code!" Can you help me?
ReplyDeleteYou have to configure you XAMPP, please read this blog properly.
Deletei have the same problem
DeleteWarning: mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. 22sm22663187pfn.190 - gsmtp in C:\xampp\htdocs\Login and Signup Form with Email Verification - PHP\controllerUserData.php on line 33
ReplyDeletewhat should i do sir. please help
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\XAMPP1\htdocs\loginform\controllerUserData.php on line 33
ReplyDeleteSignup Form
is don't work for but y say fail to connect database can you help me pls
ReplyDeletePlease create database and table name with the mentioned names.
DeleteFailed while inserting data into database! help me pls
ReplyDeletePlease create database name and table name with mentioned names.
Deletehow can you enable localhost on chromebook
ReplyDeleteMeans..?
Deleteyour the best
ReplyDeleteThank you :)
DeleteMy browser is taking forever to download the source code. Infact, it is just showing "The file will start downloading in 30 seconds time", but nothing happens after the said 30 seconds.
ReplyDeleteAnother thing, do you have a tutorial on how to auto arrange popular Posts using post hits/visits, and configuring social media sharing buttons
Can you please tell me in which blog post you get this problem so I can solve it.?
Deletewhen i try to sign up...Fail while sending code appear..pls help
ReplyDeleteMake sure you have configured you XAMPP and google account properly.
Deletenice work bro...thank you
ReplyDeleteYou're welcome bro :)
DeleteWarning: mail(): Failed to connect to mailserver at "localhost:8080" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\TDM202\gr\controllerUserData.php on line 33
ReplyDeleteWarning: mail(): Failed to connect to mailserver at "localhost:8080" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\TDM202\gr\controllerUserData.php on line 118
ReplyDeleteHi, I have been getting this errors this errors frequently "Failed while inserting data into database!"
ReplyDeleteI think The problem is from the data_check, I have tried selecting before inserting, but unto no avail, kindly help check the code again. Thanks
This error mainly shows if your database, table, column names not matched with your coding php files. So please check it.
DeleteThank you for your great work. It's very perfect until the forgot-password & resend code. Could you explain how to make it work?
ReplyDeleteI've added forget password link also..please download files and check it.
DeleteBro You Might like wala Section main Ads nhain Lag raha kindly help me. ADS kis trha lagaon
ReplyDeleteBro thoda theme me jake html ka code me change karna padta he...Instagram pe contact karo batadunga.
DeleteHow to download this file bro
ReplyDeleteDownload from here - https://www.codingnepalweb.com/p/download-timer-login-signup-form-with.html
DeleteDownload from here - https://www.codingnepalweb.com/p/download-timer-login-signup-form-with.html
Deletebro I want ask you if you are familiar wit javascript and php if you have time of course abut a little trick I don't know how to do it
ReplyDeleteBro there are no tricks...It's all about learning bro.
Deletehow to connect gmail with code on 000webhost
ReplyDeleteI'll try to make a separate video for it.
DeleteI didn't received the email verification. I already configured xampp server. do I need to change the email from the code with email that I used when configured xampp?
ReplyDeleteYes do that.
Deletehow to solve this problem
ReplyDelete"Failed while sending code!"
Please read this blog carefully
DeleteBro makes a tutorial about mobile phone verification. Please bro
ReplyDeleteOk bro..I'll try to make video on it
Deletehi bro
ReplyDeleteplease do video on user id generation(id=10001) generation and login with there userid
Ok bro...Stay tuned
DeleteAmazing site I have never visited like your site that working for others without ceasing thank you alot.
ReplyDeleteGlad to hear that :)
DeleteHi!
ReplyDeleteHave you posted the video "How to configure XAMPP" on youtube yet.
If yes please send me the link cuz i can not find it.
Here is the link of that blog - https://www.codingnepalweb.com/2020/09/how-to-configure-xampp-to-send-mail-from-localhost-in-php.html
DeleteIt is saying failed while sending code! What to do?
ReplyDeletePlease check out this blog - https://www.codingnepalweb.com/2020/09/how-to-configure-xampp-to-send-mail-from-localhost-in-php.html
DeleteI have a question. Is this method safe ?
ReplyDeleteNo it's not safe at all
DeleteHi, i do have a question.
ReplyDeleteHow long does it take to get the verification code posted into my email?
Thnx so much beast!
Between 5 to 10 seconds
Deletei waited 2 days and still nothing :(
Deletethank u.... but now how i can say when user login user can see comment. but when user do not login user can not see comment. please help.
ReplyDeleteI'll try to make video on it
DeleteWhen ?
Deletehow to configure wamp for forgort password and email verification
ReplyDeleteSame as like XAMPP
DeleteHi, why i can not get the verification code posted into my email? Can you explain it to me please?
ReplyDeleteYou have to configure your XAMPP. Check out this blog - https://www.codingnepalweb.com/2020/09/how-to-configure-xampp-to-send-mail-from-localhost-in-php.html
Deletehow to solve uncaught typeERROR in php
ReplyDeletePlease read the blog carefully
Deletei have got everything alright, but can not get the verification code posted into my email, just wtf?
ReplyDeleteMake sure you have configured your XAMPP
Deletethere is no log out form please help me
ReplyDeletePlease download code files instead of copying codes
DeleteHi, i think i do not have SENDMAIL.INI FILE in my xampp folder... can not find it. I use macOS. Can you help me with this problem? :D Thnx so much
ReplyDeleteIt is...Please search in your folder or google it to find
DeleteHello, I have uploaded this script to hostinger. after registration, email is failed to send and no options for smtp details. could you configure that?
ReplyDeleteI'll solve this and update the codes as soon as possible
DeleteThanks
ReplyDeleteYou're welcome
DeleteHi, SUPER TY. All work fine. Can you help me with this?, Im trying put this function for encrypt the password.
ReplyDeletefunction l2j_encrypt($password){
return base64_encode(pack("H*", sha1(utf8_encode($password))));
I encrypt the password in (signup-user.php / new-password.php). But, I can't use the password with this encrypt here (login-user.php). TY again <3, im wait for your answer.
You have to verify or compare user password with SHA because your DB passwords are encrypted and when user try to login, his/her password is in plain text so you've to compare it with SHA. I recommended do not use SHA. It can decrypt easily. Use password_hash.
Deletein user data control it cam error.
ReplyDeleteWhat's the error?
Deletehow can i see my website?????
ReplyDeleteMeans?
Deletebrother cpanel mai setup garda chai k garnu parxa hola? detailed bandinus na
ReplyDeleteHey Bro! Nice Work!
ReplyDeleteI want to ask that can we connect this to html site?
Like After Complete signing up, redirect to html site? Is It Possible Or We Need PHP Site?
please reply.
BTW THANKS FOR AWESOME STUFF
which file should i paste the last php code? should i make another file? what name?
ReplyDeleteis there a tutorial for Codeigniter 3, sir?
ReplyDeleteworks perfectly. but still didn't recieve any mail. xampp is configured and all but i still didn't receive the code in my gmail. followed other's suggestion like enabling IMAP in gmail setting and less secure. still didn't recieve the code. any suggestions?
ReplyDeleteFelt really good to know that we have such talented people in Nepal. Good going bro. Best wishes.
ReplyDeleteI don't see logout.php file?
ReplyDeleteSir big fan,
ReplyDeleteYou are blessed with creative mind.
Love from India
Thank you so much, this artikel help me finish the task :)
ReplyDeleteHello sir i am using infinity hosting how can i use this login page on my website please tell sir
ReplyDeletewhat is the solution for "error while sending the code"?
ReplyDeleteHow to add it in blogger😅 plz reply as soon as possible
ReplyDeletePost a Comment
We welcome relevant and respectful comments. Off-topic or spam comments may be removed.