Access denied!

Hey all,
I am trying to let users create new tables in my MySQL database. I have the script but when people run the script it gives “access denied for user etc etc…” Yet, i’ve set the permission for the user to all privledges. I’ll post the script below:

$dbh=mysql_connect ("localhost", "townfre_clients", "password") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db("townfre_$state");
$sql = ("CREATE TABLE $town(
ID tinyint( 4 ) NOT NULL AUTO_INCREMENT ,
name varchar( 50 ) ,
email varchar( 255 ) ,
PASSWORD varchar( 50 ) ,
address varchar( 200 ) ,
phone varchar( 50 ) ,
link varchar( 250 ) ,
renew varchar( 50 ) ,
short varchar( 75 ) ,
town varchar( 50 ) ,
coupon1 varchar( 200 ) ,
c1count varchar( 200 ) ,
coupon2 varchar( 200 ) ,
c2count varchar( 200 ) ,
coupon3 varchar( 200 ) ,
c3count varchar( 200 ) ,
category varchar( 50 ) ,
PRIMARY KEY ( id ) ,
UNIQUE id( id ) 
)");
echo "success!" or die();
mysql_query($sql);

There is information above that script that tells what $town is etc, all that works because all of the functions before that work fine.
Any ideas??
Thanks,
Mat