Location: PHPKode > projects > GBook > gbook/install2.php
<?
// GBook made by Racin Nygaard. If you have any questions please ask them on irc (darkking @ Efnet)
// Or email me at: hide@address.com :)

if (!isset($_POST["hehe"]) || !$_POST["hehe"] )
{
echo "Please go back..";
}
else
{
include("config.php");
$qadd = "create table $table (id smallint not null auto_increment, 
name varchar(35), date varchar(30), ip varchar(20), email varchar(50), homepage varchar(60), guestbook text, 
index(guestbook(16)), primary key (id))";

$qadd2 = "create table $bantable (id smallint not null auto_increment, ip varchar(30), dato varchar(30), primary key (id))";
  
$qadd3 = "create table $designtable (id smallint, title varchar(75), background varchar(20), picture varchar(100), tablebg varchar(20), textcolor varchar(20), logopoint varchar(100), aover varchar(20), alink varchar(20), active varchar(20), avis varchar(20))";

$qadd4 = "
     INSERT INTO $designtable
     (id,title,background,picture,tablebg,textcolor,logopoint,aover,alink,active,avis)
     VALUES
     ('1', 'My Guestbook','#F0F8FF','gbook.png', '#F0F8FF', '#000000', 'http://darkking-gbook.sourceforge.net', 
'#000000', '#006699', '#006699', '#006699')";

if (!$result = mysql_query($qadd,$link)) {

                echo mysql_error();

}
 
elseif (!$result = mysql_query($qadd2,$link)) {

                echo mysql_error();
             
}
elseif (!$result = mysql_query($qadd3,$link)) {

                echo mysql_error();
             
}
elseif (!$result = mysql_query($qadd4,$link)) {

                echo mysql_error();
             
}

else 
{

          echo "GBook has been succesfully installed! remember to run the 'after_install' script.";
}
}
?>

Return current item: GBook