Solved

How does a Website connect to the database.

Posted on 2012-04-11
4
353 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
  • 2
4 Comments
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 250 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 250 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now