Location: PHPKode > projects > Vz Omnibus BB > vz-omnibus-bb/install.php
<?php
include("config.inc.php");

if(!isset($mode)){$mode="begin";}
if($mode=="begin"){
echo"<br><br><br><center><font face=\"Verdana,Arial\" size=\"2\" color=\"#000000\">Vz Forum 1.0</font><br><br><a href=install.php?mode=install><font face=\"Verdana,Arial\" size=\"2\" color=\"#000000\"><b>INSTALL DB</b></font></a></center>";
}
if($mode=="install"){
$db = mysql_connect($db_host, $db_user, $db_password) or die ("$mysql_error");
$sql_posts="
CREATE TABLE posts (
  id int(10) unsigned NOT NULL auto_increment,
  name varchar(50) default NULL,
  email varchar(60) default NULL,
  subject varchar(200) default NULL,
  post text,
  date varchar(20) default NULL,
  time varchar(10) default NULL,
  PRIMARY KEY  (id)
)
";
$sql_replies="
CREATE TABLE replies (
  code varchar(50) default NULL,
  post_id int(10) NOT NULL default '0',
  name varchar(50) default NULL,
  email varchar(60) default NULL,
  subject varchar(200) default NULL,
  post text,
  date varchar(20) default NULL,
  time varchar(10) default NULL
)
";
mysql_db_query($db_name,$sql_posts,$db) or die("MySQL ERROR with TABLE posts...");
mysql_db_query($db_name,$sql_replies,$db) or die("MySQL ERROR with TABLE replies...");
echo"
<br>
<font face=\"Verdana,Arial\" size=\"2\" color=\"#000000\"><b>
Database Installation :<br>
TABLE posts INSTALLED<br>
TABLE replies INSTALLED<br><br><br>
<center><a href=\"$index_page\"><font face=\"Verdana,Arial\" size=\"2\" color=\"#3300CC\"><b>Click here to go to index page</b></font></a></center>
</b></font>
";
mysql_close($db);
}
?>
Return current item: Vz Omnibus BB