?
Solved

How does a Website connect to the database.

Posted on 2012-04-11
4
Medium Priority
?
360 Views
Last Modified: 2012-04-11
Hello:
My company has a website hosted in iPage.com, built with WordPress implementation.
That site connects to the company's SQL server in Chicago.

I would like to know HOW DO THE TWO COMMUINCATE?

Thanks you.
0
Comment
Question by:noamco36
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 1000 total points
ID: 37834575
Wordpress is written in PHP. PHP has function calls that allow you to connect to any database server that accepts remote connections and you have the ability to login to.
0
 

Author Comment

by:noamco36
ID: 37834626
can you give an example of PHP connection code to SQL server?

I dont know PHP language, but I want to be able to identify the connection code if I will take a look at the WordPress site code.
0
 

Author Comment

by:noamco36
ID: 37834647
Please see attached and explain.
connection.docx
0
 
LVL 1

Accepted Solution

by:
chrisroch earned 1000 total points
ID: 37836169
PHP has many database related functions that are used for:
Managing Database connections
Manipulating database structure
Manipulating the data
among others...

The number of functions increase as there are different functions for different database implementations, however the simplest means of initiating a connection to a mysql database server is displayed in the code below:

$connection = mysql_connect("server_in_chicago","user","password");

Open in new window


If the above call is successful, there are other function calls that will have be used to extract data from the database.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
This program is used to assist in finding and resolving common problems with wireless connections.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question