no, that doesn't work
<form action='<?$PHP_SELF?>' method='post'>
<table border=0>
<tr><td>Name</td><td>Pack 1</td><td>Pack 2</td><td>Pack 3</td><td>Pack 4</td><td>Pack 5</td><td>Pack 6</td><td>Pack 7</td><td>Pack 8</td><td>Pack 9</td><td>Pack 10</td></tr>
<tr>
<td><input type='text' name='opc[0]' size=10></td>
<td><input type='text' name='opc[1]' size=3></td>
<td><input type='text' name='opc[2]' size=3></td>
<td><input type='text' name='opc[3]' size=3></td>
<td><input type='text' name='opc[4]' size=3></td>
<td><input type='text' name='opc[5]' size=3></td>
<td><input type='text' name='opc[6]' size=3></td>
<td><input type='text' name='opc[7]' size=3></td>
<td><input type='text' name='opc[8]' size=3></td>
<td><input type='text' name='opc[9]' size=3></td>
<td><input type='text' name='opc[10]' size=3></td>
</tr>
<tr>
<td colspan=11><input type='file' name='file'>
<input type='submit' name='submit' value='Import'></td>
</tr>
</table>
</form>
<?
$print = get_contents($file, $opc);
echo $print;
function get_contents($file, $opc)
{
foreach($opc as $v)
{
echo $v;
}
echo $opc[0];
$fp = fopen($file, r);
include("dbconnect.php");
while ($data = fgetcsv ($fp, 1000, ",", "\""))
{
$num = count ($data);
print "<p> $num fields in line $row: <br>\n";
$row++;
$query = "insert into products(prod_name, prod_num, ship_weight, prod_description, itemUnit, p_one, p_one_op, p_two, p_two_op, p_three, p_three_op, p_four, p_four_op, p_five, p_five_op, p_six, p_six_op, p_seven, p_seven_op, p_eight, p_eight_op, p_nine, p_nine_op, p_ten, p_ten_op) values ($opc[0], $data[0], $data[5], $data[2], $data[3], $data[9], $opc[1], $data[10], $opc[2], $data[11], $opc[3], $data[12], $opc[4], $data[13], $opc[5], $data[14], $opc[6], $data[15], $opc[7], $data[16], $opc[8], $data[17], $opc[9], $data[18], $opc[10])";
$result = mysql_query($query, $mysql_link);
for ($c=0; $c < $num; $c++)
{
print $data[$c] . "<br>\n";
}
}
fclose ($fp);
}
?>