I am taking values from my form that has 39 fields, all fields have name's order as
field1,field2,field3 .......
and my sql table mytable also have 39 fields with the same name i.e. field1,field2,field3 .......
Now in the submit.php I am looking for a solution where I don't want to write all these 39 variables to store in mytable i.e. INSERT INTO mytable VALUES(field1,field2,field3,......)
But I am looking for a solution in which I don't have to write all these 39 variables and still I can store them in different 39 fields of sql. What I've tried is:
$query=mysql_query("INSERT INTO mytable VALUES (
".
for ($k=1; $k<=39; $k++)
{
$vari=$_POST["field".$k];
$Temp_previous_total++;
}
.")");