Please try this steps thus we create the database
connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysqlerror());
}
if (mysqlquery("CREATE DATABASE mydb",$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}
mysql_close($con);
?>
connecting the database
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="databasename"; // Database name
// Connect to server and select databse.
mysqlconnect($host, $username, $password)or die("cannot connect");
mysqlselectdb($dbname)or die("cannot select DB")
Regards,
Karthick
[URL="http:// www.module-node.com/"] Drupal Web Developers | | Drupal Theme Developers | Drupal Development [/URL]
!--removed tag-->
Enter your message below
Sign in or Join us (it's free).