Difficult title, let me explain
I have values in an javascript array, and I want to put these values into a form wich gets readed in PHP.
I was thinking something like this:
Result.title = the array with the titles filled in by the user. Result.price = the array with the prices filled in from the database
*the html*
<textarea id="products" type="hidden" name="products"/>
<textarea id="price_products" type="hidden" name="price_products"/>
*the javascripts*
$("#products").val(result.title);
$("#price_products").val(result.price);
*the PHP*
$products = Trim(stripslashes($_POST['products']));
$price_products = Trim(stripslashes($_POST['price_products']));
$Body .= $products;
$Body .= "\n";
$Body .= $price_products;
$Body .= "\n";
The problem with this is that I'm only sending the first value to the textarea.