I was wondering how to structure an INSERT query based on how may rows the user inputs.
I have a form where the user can tell me how many items they want to insert, then it builds the tables with an array looking like this:
$num = $_POST['num'];
for($i=0; $i<$num; $i++){
$cnt = $i+1;
<tr bgcolor=\"$colour_3\">
<td width=\"200\" valign=\"top\"><b>Product $cnt $la_title</b></td>
<td width=\"400\" valign=\"top\"><input class=\"textbox\" type=\"textbox\" name=\"title[$i]\"><font color=\"990000\"><b>*</b></font></td>
</tr>
}
It continues down the line for how many rows they want.
I need it so when they click submit the SQL query know how many rows they are wanting to insert and builds the correct syntax for it.
Any help would be great. THANKS!