If i do like this
$arrayObject1 = new ArrayObject($_POST['price']);
$arrayObject2 = new ArrayObject($_POST['weight']);
$iterator1 = $arrayObject1->getIterator();
$iterator2 = $arrayObject2->getIterator();
for ($iterator1->rewind(), $iterator2->rewind();
$price = $iterator1->current(), $weight=$iterator2->current();
$iterator1->next(), $iterator2->next())
mysql_query("insert into production(price, weight) values('".$price."', '".$weight."')") or sqlerr(__FILE__, __LINE__);
It Work - send to database (some_numbers of INSERTS with some_numbers of ID’s)
But i need only ONE insert (With ONE ID) , this data to the table.
Here is how it’s work before
$price1 = sqlesc($_POST['price1']);
$price2 = sqlesc($_POST['price2']);
$price3 = sqlesc($_POST['price3']);
$price4 = sqlesc($_POST['price4']);
$price5 = sqlesc($_POST['price5']);
$weight1 = sqlesc($_POST['weight1']);
$weight2 = sqlesc($_POST['weight2']);
$weight3 = sqlesc($_POST['weight3']);
$weight4 = sqlesc($_POST['weight4']);
$weight5 = sqlesc($_POST['weight5']);
and after i upgrate the html code
<input size="7" name="weight1"> грамм <input size="7" name="price1"> руб.
<br />
<input size="7" name="weight2"> грамм <input size="7" name="price2"> руб.
<br />
<input size="7" name="weight3"> грамм <input size="7" name="price3"> руб.
<br />
<input size="7" name="weight4"> грамм <input size="7" name="price4"> руб.
<br />
<input size="7" name="weight5"> грамм <input size="7" name="price5"> руб.
</td>
to Jquery (with maximum 5 clones)
<div class="clone"><input size="7" name="weight[]"> грамм <input size="7" name="price[]"> руб. - <a href="#" class="add" rel=".clone">Add more</a></div>
Now i need Upgrate New with Jquery to same (OLD INSERT) .
Thanks for help