Ok, thanks for that.
I have a problem with a code, can u help.
 PHP:

<?php
// Random Game Design: PHP Website Template
//  Version 1
//  Copyright Dean Whitehouse, 2008
include 'db_connect.php';
include 'config_table.inc.php';


$sql_user = "CREATE TABLE "user"(
user_id int(10) AUTO_INCREMENT NOT NULL PRIMARY KEY,
user_name varchar(100) NOT NULL,
user_password varchar(100) NOT NULL,
user_email varchar(100) NOT NULL,
user_timezone  char(3) NOT NULL,
user_hideemail  tinyint(3) unsigned NOT NULL,
user_ip varchar(20) NOT NULL,
user_ban tinyint(3) unsigned NOT NULL,
user_realname varchar (40) NOT NULL,
user_age int(10) unsigned NOT NULL,
user_class varchar(100) NOT NULL
)";


$user= mysql_query($sql_user);
if ($user)
echo('<br>User Table Created');
else
echo('Tables Not Created');
?>


that should create the table with the user submitted name

 Code:
<?php
// Random Game Design: PHP Website Template
//  Version 1
//  Copyright Dean Whitehouse, 2008
?>

<html>
<body bgcolor="#999999">
<p align="center"><font color="#000099" size="+2">Please enter the table names you want, or if you want to use the preset names click continue. NOTE: Each table must be a different name. Please do not leave any blank spaces.</font></p>
<table align="center" bgcolor="#333333" width="300px" border="0">

<form method='post' action='create_tablenames.php'>
<tr><td>
<font color="#FFFFFF">
User Details:</td><td>  
<input type="text" name="user" value="rgd_users"><br></td></tr>
<tr><td></td><td><input type='submit' value='Continue' name='check'></td></tr>
</font>
</form>

</table>

</body>
</html>

this is how they submit the name

 PHP:

<?php
// Random Game Design: PHP Website Template
//  Version 1
//  Copyright Dean Whitehouse, 2008
include 'db_connect.php';

$dbhost = $_POST["dbhost"];            // Database Host

include ("config_writetable.php");


?>


this runs the config_writeable.php file
 PHP:

<?php

// Random Game Design: PHP Website Template
//  Version 1
//  Copyright Dean Whitehouse, 2008

$config_file = "config_table.inc.php";

$fw=fopen($config_file,"w+") 
or die("Unable to open file!");    // Unable to open file

$user = "\$user = \"".$user."\";\n";

$config_write = $user;

fwrite($fw, "<?php\n".$config_write."\n?>");

fclose($fw);

?>


this writes the name to the .inc.php file

This all works, except when i click run the page that creates the table, it doesnt create one.
but i don't get any sql errors


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"