<?php
/*
Created By Adam Khoury @ www.flashbuilding.com
-----------------------June 19, 2008-----------------------
*/
// connect to your MySQL database here using the
// script we made in the previous step of this lesson
require_once "/var/www/virtual/winfreak-online.de/htdocs/scripts/connect_to_mysql.php";
// Tell ourselves on screen if we have connected
print "Success in database file CONNECTION.....<br />";
// Create the members main table in your new database
$result="CREATE TABLE myMembers (
id int(11) NOT NULL auto_increment,
firstname varchar(255) NOT NULL,
lastname varchar(255) NOT NULL,
address1 varchar(255) NOT NULL,
address2 varchar(255) NOT NULL,
state varchar(255) NOT NULL,
city varchar(255) NOT NULL,
zip varchar(255) NOT NULL,
phone varchar(255) NOT NULL,
bio_body text NOT NULL,
website varchar(255) NULL,
youtube varchar(255) NULL,
email varchar(255) NOT NULL,
password varchar(255) NOT NULL,
sign_up_date date NOT NULL default '0000-00-00',
last_log_date date NOT NULL default '0000-00-00',
account_type varchar(255) NOT NULL default 'client_type_1',
account_notes varchar(255) NOT NULL,
email_activated enum('0','1') NOT NULL default '0',
PRIMARY KEY (id),
UNIQUE KEY email (email)
) ";
if (mysql_query($result)){
echo "Success in TABLE creation!......
<br /><br /><b>That completes the table setup, now delete the file <br />
named 'create_Table.php' and you are ready to move on. Let us go!</b>";
} else {
echo "no TABLE created. You have problems in the system already, backtrack and debug!";
}
exit();
?>