peuge Posted March 27, 2008 Share Posted March 27, 2008 I have called in an array of field names entered in a from from a form in the previous php page. with these names I want to create a table with these fields in the database which has already been selected. The thing is these names could be different for each time I create a new table so I need to use these names from the array. Can I do this in the CREATE TABLE? $name_array = $_POST['fieldname']; $tname = $_POST['tname']; mysql_query("CREATE TABLE $tname( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), //WHAT DO I PUT HERE? Thanks Link to comment Share on other sites More sharing options...
roopurt18 Posted March 27, 2008 Share Posted March 27, 2008 What do you mean "what do I put here?" You put the rest of your CREATE TABLE statement. Link to comment Share on other sites More sharing options...
Barand Posted March 27, 2008 Share Posted March 27, 2008 this is the 3rd post of this question that I've seen. Don't let me find a fourth. Link to comment Share on other sites More sharing options...
Recommended Posts