Skip to content

agagula3git/php-mysql-register

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP - Complete user registration system using PHP and MySQL database

A complete user registration system using PHP and MySQL database.

Requirements

  • phpMyAdmin v5.0.4
  • XAMPP Control Panel v3.2.4

General Info

By developing this interesting project I went through the complete process of creating a user registration system where users can create an account by providing username, email and password. If users that attempt to log in to the database provide the correct data, they'll be redirected to their own page with the personal data. That page is accessible only to logged-in users.
When trying to register an account, you need to enter the hashed password for security reasons. You are required to re-enter your password and email as well. Your email and password go through a complete verification.
The layout of home page is given by the following image:

From the homepage, you can get to the registration or sign-up page by clicking on the sign up button. When you click on this button, you'll be redirected to the registration page. The layout of the registration page is given below:

Configuration instructions

The first thing you'll need to do is set up your database. Create a database called userdb. In the registration database, add a table called users. The users table will take the following three fields.

  • username - varchar(15)
  • email - varchar(30)
  • password - varchar(20)

You can create this using a MySQL client like PHPMyAdmin. When you set up your database, you need to connect to it. To connect to the database, use the following simple code:

$link = mysqli_connect("localhost", "root", "");
mysqli_select_db($link, "userdb");  

if(!$link):
  if(!mysqli_select_db($link, "userdb")):
     exit("Database <userdb> does not exist!");
  else:
     exit("Can't connect to local MySQL server!");
  endif;
endif;

For creating the connection is used the function mysqli_connect that takes the host name, username and password for the account that has the right of access to the database at MySQL server.

🙌 Contribution

I hope that this project will help you to unlock new ideas and improve your skills. Should you need any further information, please do not hesitate to contact me.

Best regards,
Ajdin G.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors