Want to edit a php site with cs5 dw

Hello everyone i am very new to php but am trying to learn it. Anyways my problem is i setup Xampp for a local server, so i can work on changing a ecommerce site i have but i keep getting this error

MySQL error: 1046- No database selected
select configuration_key as cfgKey,configuration_value as cfgValue from configuration

i have no idea what this means:mad:

Has the database been created with configuration that matches the environment the site originally created?

If you are replicating another environment you will also need to import the data from the database on the initial site to your local environment.

Can you find how it is connecting to the db?

Code with:
mysqli_connect(‘localhost’, ‘username’, ‘password’)

This could be within a file within an includes folder or function within directory structure?

So how do you select the database if i go to databases in dw and test it says connected.

that means no database was selected, or no connection…

mysqli_select_db($link, ‘db_name’)

replace db_name with the real name of your database

Thanks for the help everyone i got it to work somewhat now getting this but it is displaying the page in live view.

I am getting an error

Deprecated: Function eregi() is deprecated in F:\xampp\htdocs\Products for Horses\includes\classes\language.php on line 87

and refers to this line of code

if (eregi(‘^(’ . $value . ‘)(;q=[0-9]\\.[0-9])?$’, $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {

Does anyone know whats wrong with it?

Do you connect on a host with phpMyAdmin to look at your db contents?

Am lost i am trying to view pages of a php website in cs5 dw, i have a server setup with databases there i can view pages of a joomla site so i know it works but for some reason it will not work with this other site , it is a cre loaded professional store site is that a problem.

Do you have code like the following where you establish db connection initially with localhost, username, and password as parameters - first line, and then can give db name as parameter for mysqli_select_db function - 3rd if statement.

$link = mysqli_connect('localhost', 'username', 'root');
if (!$link) {
	$output = 'Unable to connect to the database server.';
	include 'output.html.php';

if (!mysqli_set_charset($link, 'utf8')) {
	$output = 'Unable to set database connection encoding.';
	include 'output.html.php';

if (!mysqli_select_db($link, 'db_name')) {
	$output = 'Unable to locate the Watermark Press database.';
	include 'output.html.php';

on my pc with phpadmin

How do i tell it what database to use and yes i have a database,what do you need for info i will do my best to provide it.

Is there a file in the includes for config in the org site that i can copy over to the local server database.

In your config you are making the database connection but you are not telling it what database to use. I take it you do have a database?

Thats all I can come up with with the info provided.