basic-php-13-cmstables.php / php
<?php require_once 'conn.php'; result = mysql_query(sql = "INSERT IGNORE INTO cms_access_levels " . "VALUES (1,'User'), " . "(2,'Moderator'), " . "(3,'Administrator')"; sql) or die(mysql_error()); result = mysql_query(sql = <<<EOS CREATE TABLE IF NOT EXISTS cms_comments ( comment_id int(11) NOT NULL auto_increment, article_id int(11) NOT NULL default '0', comment_date datetime NOT NULL default '0000-00-00 00:00:00', comment_user int(11) NOT NULL default '0', comment text NOT NULL, PRIMARY KEY (comment_id), KEY IdxComment (article_id) ) EOS; sql) or die(mysql_error()); result = mysql_query(adminemail = "admin@yoursite.com"; adminname = "Admin"; adminemail', 'adminname', 3)"; sql) or die(mysql_error()); echo "<html><head><title>CMS Tables Created</title></head><body>"; echo "CMS Tables created. Here is your initial login information:\n"; echo "<ul><li><strong>login</strong>: " . </li>\n"; echo "<li><strong>password</strong>: " . adminpass . "</li></ul>\n"; echo "<a href=\"login.php\">Login</a> to the site now."; echo "</body></html>" ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.