PHP Signup with OTP Email Verification System - Overview (Part 1)



source

Series Overview:

Nowadays most websites are secured and their owner makes sure to validated their website's input form to get the correct information from users.

For this purpose website, administration integrated a system called OTP (One Time Pass) OR email verification OR SMS verification.

So what happens when a user visits the website and creates an account on that website, the user has to provide them some information to create an account like name, email, mobile number, etc.

At that time the website uses your email OR mobile number and sends you a verification email OR OTP OR SMS to verify your identity to make sure you are a human, not a robot OR the information you have provided is correct.

After observing this system I am creating an exact system in PHP, In this video, I will give you a brief overview and demo to see how the system is worked.

There are some requirements that I am showing here.
  • Localhost (XAMPP) / Live host
  • Create a Database in phpMyAdmin
  • phpMailer Library
  • SMTP mail delivery system (Gmail, SendGrid, etc.)
  • HTML form to submit data into database
In this case, I am using localhost (XAMPP) and I have already created an HTML template and design it using CSS.

Creating Database Table:

CREATE TABLE `user` (
  `uid` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `signup_time` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `otp` varchar(255) NOT NULL,
  `activation_code` varchar(255) NOT NULL,
  `reset_code` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `user`
  ADD PRIMARY KEY (`uid`);

ALTER TABLE `user`
  MODIFY `uid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;

2 Comments

Post a Comment

Post a Comment

Previous Post Next Post