Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Creating a Database in MySQL

Sun Oct 26, 2008 7:05 pm

Code:
<?php
  $host
="";
  
$uname="";
  
$pass="";
  
  
$connectionmysql_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.";
?>




Post a reply
  Related Posts  to : Creating a Database in MySQL
 creating database in netbeans     -  
 dump Mysql database     -  
 import Mysql database     -  
 Optimize All Tables In A MySQL Database     -  
 IP Address Lookup in Bulk Using C-Sharp and MySQL Database     -  
 Creating table using div tag     -  
 Creating a Directory in php     -  
 Creating a Method in jsp     -  
 Creating a JAR file in Java     -  
 Creating your own Exceptions in Java     -  

Topic Tags

PHP Database