<?php
$connect = mysql_connect("localhost", "root", "") or
die("Could not establish connection");
$create = mysql_query("CREATE DATABASE IF NOT EXISTS users") or die (mysql_error());
mysql_select_db("test");
$user= "CREATE TABLE test (
id int NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
password varchar(255) NOT NULL,
email varchar(255) NOT NULL,
gender char(1) NULL,
phno int(10) NOT NULL,
url varchar(255) NOT NULL,
address varchar(255) NOT NULL,
username varchar(255) NOT NULL,
PRIMARY KEY(id)
) ENGINE = MYISAM ";
$results = mysql_query($user) or die (mysql_error());
echo "Database Table Created";
?>
Post a Comment