Skip to content
The diagram below illustrates the form handling process. This will create an HTML form.
Mine is Sublime Text 3.Open the register.php file and paste the following code in it:Notice also that we are including the errors.php file to display form errors.
A form is an User registration or sign up is an integral part of many web applications and it is critical to get it right for the success of the application. Hence this page is accessible to only logged in users.
Passwords are also compared to make sure they match.If no errors were encountered, the user is registered in the But error messages are not displaying now because our errors.php file is still empty.
The part of the code that receives this form data is written in the server.php file and that's why we are including it at the very top of the register.php file.
Just open the login page and put this code inside it:Everything on this page is quite similar to the register.php page.Now the code that logs the user in is to be written in the same server.php file. // create a database CREATE DATABASE student USE student // create a table studentdetails CREATE TABLE IF NOT EXISTS studentdetails ( id int(11) NOT NULL AUTO_INCREMENT, name char(50) NOT NULL, email varchar(50) NOT NULL, password varchar(50) NOT NULL, mobile bigint(20) NOT NULL, gender enum('m','f') NOT NULL, hobbies varchar(100) NOT NULL, dob date NOT NULL, address text … How To Create a Register Form Step 1) Add HTML: Use a