<?php $host="mysql153.secureserver.net"; $uname="navioo"; $pass="password"; $database="navioo"; $tablename="mytable";
$connection= mysql_connect ($host, $uname, $pass) or die ("Database connection failed!");
$result=mysql_select_db ($database) or die ("Database could not be selected"); $query = "create table ". $tablename ." (name varchar (20) Not Null, email varchar (40) Not Null)"; $result = mysql_query ($query); if (! $result) { die ("Query could not be executed."); } else { echo $tablename." created in the megabase database.n"; } ?>
|