To take the fields from a form and build a database on the fly do the following:
foreach($_POST as $var => $value)
{
$squery = "ALTER TABLE `table_name` ADD COLUMN `$var` varchar(255)";
// then run query here
}
To take the fields from a form and build a database on the fly do the following:
foreach($_POST as $var => $value)
{
$squery = "ALTER TABLE `table_name` ADD COLUMN `$var` varchar(255)";
// then run query here
}