This project consists of 3 parts :
-
Database creation using phpMyadmin.
-
Login.
-
Registration.
-
type localhost in your browser's search tab .
-
open phpMyadmin .
-
enter create database table .
-
enter the number of columns you need in your table .
-
you can edit the properties of each column .
for example : you can make an id column autoincremented.
you can also make date column to writedown the date of your data insertions into the database.
These two files for only the beginning of the form to choose if you want to login or Register.
login.html & login.css :
1-you will be asked to enter the email and password to login and it will take the data from you as a user and pass it to the php file .
2-you must enter the required data . if you don't fill any of them , an alert will be shown to ask you to fill the info .
login.php :
- The connection between the database and the html is written in this part of code .
- It takes the email and password it search for them in the database. if the email & password exit , it will display welcome : "your input e-mail". if any of them is not correct , it will display "your e-mail or password is incorrect" .
reg.html & reg.css :
1- You will be asked to enter the email , username , password ,confirm tha password to register sucessfully and it will take the data from you as a user and pass it to the php file .
2- You must enter the required data . if you don't fill any of them , an alert will be shown to ask you to fill the info .
3- The password must be identical with the confirm password .
4- The e-mail should have @ and . and some letters must be existed between them to be in a valid format .
reg.php :
- The connection between the database and the html is written in this part of code .
- It takes the passed data from the html and insert them into the database. if the email already exists before , it will display "This e-mail already exists". if all data is in correct format and the e-mail is new , it will display "Welcome (username)" .
-