Im trying to fix this install file.. it doesnt seem to work.. clicking on install does nothing.
after inspecting the code its obvious its ment to go through steps of an install but i dont know how to get it working.. please can anyone help??
the full scirpt can be found at
http://www.teca-scripts.com/
i actually want to modify this script a lot.. i want to make it so people can create an account and keep an online diary.. so if anyone wants to help i would really appreciate it!
thanks :-)
<? include("./diary.php"); ?>
<?
$page = $page?$page:'1';
if ($page == 3) header("Location: ./introduction.php");
?>
<html>
<head><title>Teca Diary PE</title></head>
<style>
<!--
a {text-decoration: none}
a:hover {text-decoration: underline overline}
// -->
</style>
<body background="./images/bg_tile.jpg">
<table border=0 width=750>
<tr>
<td><img src="./images/header.gif" width=750 height=60></td>
</tr>
<tr>
<td>
<font style="font: 10pt Verdana">
<form action="install.php" method=post>
<p><table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr><td>
<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td bgcolor=#000000>
<table border=0 width=100% cellspacing=1 cellpadding=10><tr><td bgcolor="#ffffdd">
<font style="font: 10pt Verdana">
<?
if ($page == 1) {
print "<p>Make sure that you have entered the correct data in config.php, and press INSTALL</p>\n";
print "<input type=submit value=\"INSTALL\" style=\"font: 10pt Verdana\">\n";
print "<p>Remember to delete this file, install.php, after the installation.</p>\n";
}
if ($page == 2) {
if (mysql_query("SELECT * FROM tecadiary_config")) {
print "Table <font face=\"Courier New\">tecadiary_config</font> already exists.<br>\n";
}
else {
mysql_query("CREATE TABLE `tecadiary_config` (`name` varchar(255) NOT NULL default '', `value` text NOT NULL)");
mysql_query("INSERT INTO `tecadiary_config` VALUES ('config_title', '')");
mysql_query("INSERT INTO `tecadiary_config` VALUES ('config_introduction', '')");
print "Table <font face=\"Courier New\">tecadiary_config</font> created.<br>\n";
}
if (mysql_query("SELECT * FROM tecadiary_entry")) {
print "Table <font face=\"Courier New\">tecadiary_entry</font> already exists.<br>\n";
}
else {
mysql_query("CREATE TABLE `tecadiary_entry` (`entry_date` date NOT NULL default '0000-00-00', `entry_title` varchar(255) NOT NULL default '', `entry_content` text NOT NULL, UNIQUE KEY `entry_date` (`entry_date`))");
print "Table <font face=\"Courier New\">tecadiary_entry</font> created.<br>\n";
}
if (mysql_query("SELECT * FROM tecadiary_reply")) {
print "Table <font face=\"Courier New\">tecadiary_reply</font> already exists.<br>\n";
}
else {
mysql_query("CREATE TABLE `tecadiary_reply` (`entry_date` date NOT NULL default '0000-00-00', `reply_date` datetime NOT NULL default '0000-00-00 00:00:00', `reply_name` varchar(255) NOT NULL default '', `reply_email` varchar(255) NOT NULL default '', `reply_content` text NOT NULL)");
print "Table <font face=\"Courier New\">tecadiary_reply</font> created.<br>\n";
}
print "<input type=submit value=\"Continue...\" style=\"font: 10pt Verdana\">\n";
}
?>
</font>
</td></tr></table>
</td></tr></table>
</td></tr>
</table></p>
<input type=hidden name=page value="<?=($page+1)?>">
</form>
</font>
</td>
</tr>
<tr>
<td colspan=3 align=right><font style="font: 8pt Verdana">Powered by <a href="http://www.teca-scripts.com">Teca Diary</a> © 2003 <a href="http://www.teca-scripts.com">Teca-Scripts.com</a>.</font></td>
</tr>
</table>
</body>
</html>