Signup as a Tutor

As a tutor you can connect with more than a million students and grow your network.

How To Connect To Server Using PHP?

Dongri Mohammed Jawad
03 Jan 0 0

It is very easy to connect to server using PHP and MYSQL.

PHP is a very friendly Programming Language that any one can learn who know the basics of the Front End Development. PHP is a programming Language which execute the piece of code only in a server.

To run the PHP code, there are some Local Server control Panel are there like XAMPP, WAMP, YAMP, etc.

Here we are going to use XAMPP. XAMPP is one of the best control panel among the others like wise the PHP among the Others.

Connecting to Server :

In Php, there is a predefined function which helps the user to get connect to the server. mysqli_connect();

The parameters of this Predefined Function are:

  • Local host or This is a IP Address of the Server. It is unique for different users. We have to keep it secure.
  • Root -> "root" is the default username in XAMPP, while you are executing in the server you have to create the username and Password.
  • ' ' -> The password for the XAMPP to connect to server is NULL

So lets begin the Code.

0 Dislike
Follow 3

Please Enter a comment


Other Lessons for You

How to Create A Master Page Template In PHP?
A master page template is essential to give a consistent look and feel to any website having multiple pages. It is quite easy to create a master page template in PHP using Dreamweaver. Let’s have...

Karmick Institute | 10/08/2017

0 0
Happiness Or Satisfaction: How To Quit Your Day Job?
Four years ago on a sunny April morning, I slinked into my new office building, suit slightly too big, 24-years-old and clueless. It was my first day working at a large, prestigious Organization. The first...

Rohit Raj Verma | 29/07/2017

0 0
Truncate, Drop And Delete Commands In SQL
Truncate: Truncate command will delete the Table data only, it keeps the table schema as it is. Table data Can be rollback Example : TRUNCATE TABLE User; Drop: Drop command will delete both Table data...

Umasankar Natarajan | 07/07/2017

0 0
SQL Tips (4 to 6)
SQL tips 4:Avoid INDEX, unless you need to retrieve information quickly. Index will slower insert and update data query.The another way is using sub querySelect MAX(salary)FROM employeeWHERE salary IN(Select...

Umasankar Natarajan | 07/07/2017

0 0
Git Branching: Basic Branching And Merging
Basic Branching and Merging: Let’s go through a simple example of branching and merging with a workflow that you might use in the real world. You’ll follow these steps: Do work on a web site. Create...

Rohit Raj Verma | 24/06/2017

0 0

Looking for PHP Classes?

Find best PHP Classes in your locality on UrbanPro.

Do you offer PHP Classes?

Create Free Profile »

Find Best PHP Classes?

Find Now »