i just cant figure out my problem. Even had a friend that is fairly good at php programing look at it and he didnt know either. I have a feeling that it is in the table creation area that is causing my problem.
...
<?
/**
* The user is already logged in and not allowed to register unless admin.
*/
if($session->isAdmin()){
echo "[<a href=\"../dealercenter.php\">Dealer Center Home</a>] ";
echo "[<a href=\"process.php\">Logout</a>]";
?>
<br /><br /><p>Add Warranty Table</p>
<form action="<?=$_SERVER['PHP_SELF']?>" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr>
<td>Username:</td><td><input type="text" name="user" maxlength="30"></td>
</tr>
<tr>
<td><input type="submit" value="Add Warranty table!"></td>
</tr>
</table>
</form>
<?
$user=$_POST['user'];
$sql = "CREATE TABLE `custkis6_login`.`$user` ( `model` varchar( 10 ) NOT NULL ,
`serial` int( 10 ) NOT NULL ,
`servdate` varchar( 10 ) NOT NULL ,
`faildate` varchar( 10 ) NOT NULL ,
`repairdate` varchar( 10 ) NOT NULL ,
`comment` longtext NOT NULL ,
`traveltime` mediumint( 3 ) NOT NULL ,
`repairtime` mediumint( 3 ) NOT NULL ,
`claimhours` mediumint( 3 ) NOT NULL ,
`hourrate` varchar( 3 ) NOT NULL ,
`claimname` varchar( 50 ) NOT NULL ,
PRIMARY KEY ( `serial` ) ) ENGINE = MyISAM DEFAULT CHARSET = latin1;[...]";
}
else ($session->logged_in){
echo "<p>Access Denied</p>";
echo "<p>We're sorry <b>$session->username</b>, but you've not allowed to view this page. "
."<a href=\"../dealercenter.php\">Main</a>.</p>";
}
...