change this part so that $query is capitalized if (mysql_db_query ($DBName, $query, $Link)){ -----Original Message----- From: denis@comtechservices.com [mailto:denis@comtechservices.com] Sent: Wednesday, December 11, 2002 11:23 AM To: php-db@lists.php.net Subject: A little advise please Hello, I have a bit of problem with a script . . . looking for help. The script pretty much works as it creates the table I want, However, the display is incorrect as it states the creation was unsuccessful. Here is the actual script: <HTML> <HEAD> <TITLE>This PHP script creates a table called Feedback in a database called livetest</TITLE> <BODY> <?php $Host="localhost"; $User="root"; $Pasword=""; $DBName="livetest"; $TableName="$Name"; if ($Link=mysql_connect($Host, $User, $Password)){ print("Successfully connected to the database<BR>\n"); }else{ print ("Sorry, we did not successfully connect to the database.<BR>\n"); } $Query="CREATE TABLE $TableName (ID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstName TEXT, LastName TEXT, Email TEXT, Comments TEXT)"; if (mysql_db_query ($DBName, $query, $Link)){ print("<BR>The table creation was a success!"); } else { print("<BR>Sorry, the table was not created successfully."); } mysql_db_query ($DBName, $Query, $Link); mysql_close($Link); ?> </BODY> </HTML> Now, as I said, the table does get created. But the output says: "Successfully connected to the database Sorry, the table was not created successfully. " What on earth am I doing wrong? Thanks for the help (in advance). Denis Lahaie denis@comtechservices.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php