I have the following code:
Code:
$query="";

$queryFile = fopen('create_tables.sql', "r") or exit("Unable to open file!");
while(!feof($queryFile))
  {
    $query = $query . fgets($queryFile);

  }
fclose($queryFile);

$query = str_replace("\n",'',$query);

echo $query ."<br /><br /><br />";

$result = mysql_query($query);

echo $result;

mysql_close($conn);

inside the create_tables.sql file i have this:
Code:
CREATE TABLE UserTable(
InputID int not null auto_increment, 
Element varchar(60), 
Username varchar(60), 
Password varchar(60), 
Comment varchar, 
primary key(InputID))
I'm new to PHP and MySQL, so i don't really know what's going wrong here. Apparently there doesn't need to be a semicolon at the end of this SQL statement?
I'm trying to create a table with those columns. You can see the primary key.

Database access is successful, just there's nothing being returned when that query is executed and no table is created in that database.