<?php
$host="localhost"; $user="root";
$password="";
mysql_connect($host,$user,$password);
if(!mysql_select_db("mynewdb"))
{
$createdb="create database mynewdb";
mysql_query($createdb) or die("can't create database");
}
echo "database already exist";
$password="";
mysql_connect($host,$user,$password);
if(!mysql_select_db("mynewdb"))
{
$createdb="create database mynewdb";
mysql_query($createdb) or die("can't create database");
}
echo "database already exist";
?>
Comments
Post a Comment