Mega Code Archive

 
Categories / Php / MySQL Database
 

Creating a Database in MySQL

<?php   $host="mysql153.secureserver.net";   $uname="rntsoft";   $pass="password";      $connection= mysql_connect ($host, $uname, $pass);   if (!$connection) {     die ("A connection to the server could not be established!");   }   $result=mysql_create_db ("mydatabase");   if (!$result) {     die ("database could not be created!");   }   echo "Database megabase was created successfully."; ?>