Whats the problem with doing this?
PHP Code:
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
// Create database
if (mysql_query("CREATE DATABASE Users",$con))
{
echo "Database created!";
}
else
{
echo "Error creating database: " . mysql_error();
}
// Create table in WB database
mysql_select_db("Users", $con);
$sql = "CREATE TABLE Records
(
id int not null auto_increment,
username text,
password text,
primary key(id)
)";
mysql_query($sql,$con);
// Create table in WB database
mysql_select_db("Users", $con);
$sql = "CREATE TABLE Records
(
id int not null auto_increment,
username text,
password text,
primary key(id)
)";
mysql_query($sql,$con);
mysql_close($con);
?>
Bookmarks