10 websites to get free images for website (2021 Edition)

Are you searching for a website from which you can get free images for the website? Are you tired of searching for...

Top 10 free responsive blogger templates for 2021 which will make your blog look amazing

The aesthetic value of a website is very important because when a user visits a site the first thing he will notice...

PHP Tutorial 2 – Create a simple Login page part 2

This is tutorial is sequential of previous PHP tutorial. If you have not check that one please follow that tutorial before starting this one.PHP...

PHP Tutorial 2 – Create a simple Login page part 1 (Source Code Explained)

In this tutorial, I'm going to create a very basic login page which where the user can register and login with username and password....

PHP – How to create a database?

In this tutorial, I'm going to teach you how to create a MySQL database for PHP. I'll explain everything you need to create a...

PHP Tutorial 1 – setup PHP on your computer

What is PHP? PHP is a widely-used general-purpose scripting language that is widely used by web developers....

PHP – How to create a database?

In this tutorial, I’m going to teach you how to create a MySQL database for PHP. I’ll explain everything you need to create a database for your website.

Contents

  1. Server Setup
  2. Creating Database
  3. Create Tables
  4. Common Datatypes

1)  Server Setup

If you are very new to web development please follow this tutorial to setup PHP on your computer.

                PHP Tutorial 1 – setup PHP on your computer

Now, if you have done everything corrects our server will be ready to work. Next, we will open XAMPP control panel. Depending on where you have installed, you will need to look through the XAMPP directory and search for “xampp-control”.
             

XAMPP control panel settings tweak

In the control panel run Apache and MySQL by clicking start. If you are using WAMP all the steps will be same as XAMPP.

2) Creating Database
Open any web browser and In URL type “localhost/phpmyadmin”. This will lead to phpmyadmin home page.
       

  • From there click on Databases tab located on top. 
  • Now, under create database enter your database name(for example chat_db). Then click on create, leave ‘Collation’ as it’s.
    *Don’t give any space in the database name, you can use ‘_’.

how to create database using phpmyadmin

3) Create Tables

 Now on left side search for your database name. Then click on it, this will lead you to create a table.

Here we are creating a table name “user_info”, which will have 3 columns.

creating table for a database chat_db

“user_info” table will have an id, username, password column. You can see table structure in below  image,

user_info table structure

After you fill necessary information click on save.

That’s all Congratulation you have successfully created a database in PHP – MySQL.

4) Common data types
Here are some commonly used attributes in databases. You maybe need them when creating another database.

  • Format: Column Name – Type – Length – Null Property – Other Properties
  • email – VARCHAR – 50 – not null
  • phone_no – VARCHAR  -13 – not null
  • date_of_birth – DATE – – not null
  • address – VARCHAR – 255 – not null

I would like to hear from you, tell me in comments below if you have any queries or feedback.

Discover a hidden easter egg

10 websites to get free images for website (2021 Edition)

Are you searching for a website from which you can get free images for the website? Are you tired of searching for...

Top 10 free responsive blogger templates for 2021 which will make your blog look amazing

The aesthetic value of a website is very important because when a user visits a site the first thing he will notice...

Top 10 free responsive blogger templates for 2021 which will make your blog look amazing

The aesthetic value of a website is very important because when a user visits a site the first thing he will notice...

PHP Tutorial 2 – Create a simple Login page part 2

This is tutorial is sequential of previous PHP tutorial. If you have not check that one please follow that tutorial before starting this one.PHP...

PHP Tutorial 2 – Create a simple Login page part 1 (Source Code Explained)

In this tutorial, I'm going to create a very basic login page which where the user can register and login with username and password....

PHP – How to create a database?

In this tutorial, I'm going to teach you how to create a MySQL database for PHP. I'll explain everything you need to create a...

A word from our sponsor

read more

10 websites to get free images for website (2021 Edition)

Are you searching for a website from which you can get free images for the website? Are you tired of searching for...

10 websites to get free images for website (2021 Edition)

Are you searching for a website from which you can get free images for the website? Are you tired of searching for...

Top 10 free responsive blogger templates for 2021 which will make your blog look amazing

The aesthetic value of a website is very important because when a user visits a site the first thing he will notice...

PHP Tutorial 2 – Create a simple Login page part 2

This is tutorial is sequential of previous PHP tutorial. If you have not check that one please follow that tutorial before starting this one.PHP...

PHP Tutorial 2 – Create a simple Login page part 1 (Source Code Explained)

In this tutorial, I'm going to create a very basic login page which where the user can register and login with username and password....

PHP – How to create a database?

In this tutorial, I'm going to teach you how to create a MySQL database for PHP. I'll explain everything you need to create a...

10 websites to get free images for website (2021 Edition)

Are you searching for a website from which you can get free images for the website? Are you tired of searching for...

Top 10 free responsive blogger templates for 2021 which will make your blog look amazing

The aesthetic value of a website is very important because when a user visits a site the first thing he will notice...

PHP Tutorial 2 – Create a simple Login page part 2

This is tutorial is sequential of previous PHP tutorial. If you have not check that one please follow that tutorial before starting this one.PHP...

PHP Tutorial 2 – Create a simple Login page part 1 (Source Code Explained)

In this tutorial, I'm going to create a very basic login page which where the user can register and login with username and password....

PHP – How to create a database?

In this tutorial, I'm going to teach you how to create a MySQL database for PHP. I'll explain everything you need to create a...

PHP Tutorial 1 – setup PHP on your computer

What is PHP? PHP is a widely-used general-purpose scripting language that is widely used by web developers....

10 websites to get free images for website (2021 Edition)

Are you searching for a website from which you can get free images for the website? Are you tired of searching for...

Top 10 free responsive blogger templates for 2021 which will make your blog look amazing

The aesthetic value of a website is very important because when a user visits a site the first thing he will notice...

PHP Tutorial 2 – Create a simple Login page part 2

This is tutorial is sequential of previous PHP tutorial. If you have not check that one please follow that tutorial before starting this one.PHP...

PHP Tutorial 2 – Create a simple Login page part 1 (Source Code Explained)

In this tutorial, I'm going to create a very basic login page which where the user can register and login with username and password....

PHP – How to create a database?

In this tutorial, I'm going to teach you how to create a MySQL database for PHP. I'll explain everything you need to create a...

explore

other articles

Top 10 free responsive blogger templates for 2021 which will make your blog look amazing

The aesthetic value of a website is very important because when a user visits a site the first thing he will notice...

PHP Tutorial 2 – Create a simple Login page part 2

This is tutorial is sequential of previous PHP tutorial. If you have not check that one please follow that tutorial before starting this one.PHP...

PHP Tutorial 2 – Create a simple Login page part 1 (Source Code Explained)

In this tutorial, I'm going to create a very basic login page which where the user can register and login with username and password....

PHP – How to create a database?

In this tutorial, I'm going to teach you how to create a MySQL database for PHP. I'll explain everything you need to create a...

PHP Tutorial 1 – setup PHP on your computer

What is PHP? PHP is a widely-used general-purpose scripting language that is widely used by web developers....

How to Recover Deleted Files from any storage device for free

Have you been in trouble of losing important files on PC hard drive, sd card, or pen drive because of wrong deleting...

10 websites to get free images for website (2021 Edition)

Are you searching for a website from which you can get free images for the website? Are you tired of searching for...

Top 10 free responsive blogger templates for 2021 which will make your blog look amazing

The aesthetic value of a website is very important because when a user visits a site the first thing he will notice...

PHP Tutorial 2 – Create a simple Login page part 2

This is tutorial is sequential of previous PHP tutorial. If you have not check that one please follow that tutorial before starting this one.PHP...

PHP Tutorial 2 – Create a simple Login page part 1 (Source Code Explained)

In this tutorial, I'm going to create a very basic login page which where the user can register and login with username and password....

PHP – How to create a database?

In this tutorial, I'm going to teach you how to create a MySQL database for PHP. I'll explain everything you need to create a...