How to connect mysql database using php?

In this article I show you how to php connect with database and access data from it. Before this you know about how to run php files on local computer. If you don’t please read my recent tutorial How to execute PHP files on LOCALHOST using WAMP, MAMP or XAMPP?”

Section -1: Create database & table using “phpmyadmin“

Section -2: Create index.php, conn.php files for database connectivity.

Section -3: Run files on localhost

 

 

Section-1: Create database & table using “phpmyadmin “

Step-1.1: Right clicks and chooses phpmyadmin i.e.

How to connect mysql database using php - step-1
Step-1

 

 

 

 

 

Step-1.2: Choose Database and create new database i.e.

 

 

Advertisements

Author: maheshwaghmare

WordPress Developer since 2012

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s