Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we create a database using PHP and mysql?

Answer Posted / sunil kumar

It`s simple than above

<?php
mysql_connect("localhost","root","");//connect to host
$sql_create_db="create database my_db";
if(mysql_query($sql_create_db))
echo"Database is created";
else
echo"Error in creating Database".mysql_error();

?>

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain difference between urlencode and urldecode?

1179


What are the benefits of composer?

1062


How to get the position of the character in a string in php?

1125


What is the difference between rest and soap?

1208


Which php framework is in demand?

945


Does csrf token change?

962


What are the differences between session and cookie?

1070


Is php better than java?

1026


What are the steps involved to run php?

1117


What is cURL in PHP?

1034


How to count all the lines of code in a directory and sub folder?

1026


How can image properties be retrieved in php?

1041


How to convert a json string to an array in php?

1118


Which operator is used to concatenate two strings in PHP?

1077


Does empty check for null?

1017