<?php

$sql_error = '<div align=center><b>Error detected - Could not connect to database.<br>Check that you have filled out the form above correctly.<br><br><b><i>SQL Error :</i></b><br></div>';

require '../include/global.php';
require '../include/mysql.php';

//--------------------->

mysql_query ("CREATE TABLE IF NOT EXISTS `USERS` (`ID` INT NOT NULL AUTO_INCREMENT ,

`FIRSTNAME` varchar(255) NOT NULL,
`LASTNAME` varchar(255) NOT NULL,
`COMPANYNAME` varchar(255) NOT NULL,
`COUNTRY` varchar(255) NOT NULL,
`STATEPROV` varchar(255) NOT NULL,
`CITY` varchar(255) NOT NULL,
`STREETADDRESS` varchar(255) NOT NULL,
`PHONE` varchar(255) NOT NULL,
`USERNAME` varchar(255) NOT NULL,
`PASSWORD` varchar(255) NOT NULL,
`EMAIL` varchar(255) NOT NULL,
`STATUS` varchar(255) NOT NULL,

PRIMARY KEY ( `id` ) )");

//--------------------->

$sql = "INSERT INTO USERS SET
USERNAME = '$admin_username',
PASSWORD = '$admin_password',
STATUS = '1'";
$query = mysql_query($sql) or die("$sql_error<br><div align=center>" . mysql_error() . "</div>");

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>One moment please...</title>
<meta http-equiv="REFRESH" content="0;url=../admin/"></HEAD>
<BODY></BODY>
</HTML>

