UrbanPro
true

Learn PHP from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How To Connect To Server Using PHP?

Dongri Mohammed Jawad
03/01/2018 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 127.0.0.1 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

Submit

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...

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...

PHP Intro.
What is PHP? PHP is an acronym for "PHP Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP costs nothing, it is free to download and...

Hiding .php extension Using HTACESS File
If you wish to hide.php extension from your website, then create a .htaccess file in your project root and paste the following code : RewriteEngine On RewriteCond %{THE_REQUEST} ^{3,}\s/(.+)\.php*...

Read Your Gmail Emails Using PHP and IMAP
Hello Friends ,Recently I have worked on drip email campaign project for that I need to read emails using PHP From the gmail inbox. Here is the simple example for Read emails from the gmail: To start...

Looking for PHP Classes?

Learn from Best Tutors on UrbanPro.

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for PHP Classes?

The best tutors for PHP Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn PHP with the Best Tutors

The best Tutors for PHP Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more