I have an input field that when submitted is supposed to create a mysql table.
create_table.html
<form action="table.php">
<input type="text" name="tbinfo" value="CREATE TABLE "> <input type="submit">
</form>
table.php
mysql_connect($host, $user, $pass);
mysql_select_db($database);
mysql_query($tbinfo);
mysql_close();
now, when i put in the field : CREATE TABLE something(rowid INT, email CHAR(255))
and submit it, it works fine and creates it.
Now if I do the same thing, but add :
CREATE TABLE something(rowid INT AUTO_INCREMENT PRIMARY KEY, email CHAR(255))
it doesn't work.
What do I do?