If problem with $username then use next code
$username = htmlspecialchars($_POST['username']);
mysql_connect("$server", "$db_user", "$db_pass") or die(mysql_error());
mysql_select_db("singlese_messages") or die(mysql_error());
mysql_query("CREATE TABLE " . $username . " (
`id` INT( 50 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`username` VARCHAR( 75 ) NOT NULL ,
`subject` VARCHAR( 150 ) NOT NULL ,
`message` TEXT NOT NULL ,
`gift` VARCHAR( 50 ) NOT NULL,
`new` VARCHAR( 5 ) NOT NULL ,
`date_created` VARCHAR( 50 ) NOT NULL ,
`date_modified` VARCHAR( 50 ) NOT NULL )") or die(mysql_error());
mysql_close();
btw why do you need to create table for every new user?