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 with these field names 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? Link to comment https://forums.phpfreaks.com/topic/98075-creating-table-fields-from-an-array/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.