<?php
$config = parse_ini_file('config.ini.php', true);
extract($config);
extract($database);
$conn = mysql_connect($host, $username, $password) or die('Could not connect to server. Check your database details.');
mysql_select_db($db, $conn) or die('Could not select database.');
$uresult = mysql_query("create table ".$prefix."users (
username varchar(20) not null primary key,
password varchar(16) not null,
groupid varchar(20)
)") or die('Could not create users table.');
print 'Users table created successfully.';
$gresult = mysql_query("create table ".$prefix."groups (
groupid varchar(20) not null primary key
)") or die('Could not create groups table.');
print 'Groups table created successfully.';
?>
|