Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 362
  • Last Modified:

How does a Website connect to the database.

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
noamco36
Asked:
noamco36
  • 2
2 Solutions
 
Jason C. LevineNo oneCommented:
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
 
noamco36Author Commented:
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
 
noamco36Author Commented:
Please see attached and explain.
connection.docx
0
 
chrisrochCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now