PHP - Database Connectivity Error at local host.

Started by Black Ninja, December 27, 2012, 05:55:03 AM

Black Ninja

Query to select database:
$select = mysql_select_db($db_table, $con);

I have connected database by require() function.

<?php
require(connection.php)
$select=mysql_select_db($test);
if ($select)
{
echo "database selected";
}
else {
echo "database not selected";
}
?>


This showed the error and output was: database not selected.

Where is error?