Many thanks for your help.
in one instance I may have
<input type=text name=name />
<input type=text name=height />
<input type=text name=length />
<input type=text name=width />
<input type=text name=weight />
Where I have to calculate the total weight of 1 item, then submit the data to the database with
mysql_query(INSERT INTO table (name, height, length, width, weight) VALUES ('$name', '$height', '$length', '$width', '$weight')
but I will also be faced with the following
<input type=text name=name />
<input type=text name=height_1 />
<input type=text name=length_1 />
<input type=text name=width_1 />
<input type=text name=weight_1 />
<input type=text name=height_2 />
<input type=text name=length_2 />
<input type=text name=width_2 />
<input type=text name=weight_2 />
<input type=text name=height_3 />
<input type=text name=length_3 />
<input type=text name=width_3 />
<input type=text name=weight_3 />
where I need to calculate
$total_weight=$weight+$weight_1+$weight_2+$weight_3;
and add 3 items to the database, where name is the same for all 3 items.
mysql_query(INSERT INTO table (name, height, length, width, weight) VALUES ('$name', '$height', '$length', '$width', '$weight'), ('$name', '$height_1', '$length_1', '$width_1', '$weight_1'), ('$name', '$height_2', '$length_2', '$width_2', '$weight_2'), ('$name', '$height_3', '$length_3', '$width_3', '$weight_3')
Indeed, the instances of height, length, width, weight could be from 1 to 100, dependent on the user using the form.
Again many thanks, I hope this helps.