# Passing hidden vars from flash to php

**URL:** <https://forum.kirupa.com/t/passing-hidden-vars-from-flash-to-php/271774>\
**Category:** Uncategorized\
**Created:** [September 28, 2008, 8:35am UTC](https://forum.kirupa.com/t/passing-hidden-vars-from-flash-to-php/271774 "2008-09-28T08:35:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![red\_sofa](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@red\_sofa](https://forum.kirupa.com/u/red_sofa)\
**Post date:** [September 28, 2008, 8:35am UTC](https://forum.kirupa.com/t/passing-hidden-vars-from-flash-to-php/271774/1 "2008-09-28T08:35:18Z")

</div>

I’m placing swfs in product pages of a oscommerce site.  
I trying to send the whole info of a certain product to the shopping cart.

ORIGINAL CODE IS:

```auto
 
 
<form name="cart_quantity" action="http://www.shop.com/product_info.php&action=add_product" method="post"><input type="hidden" name="products_id" value="26">
    <input type="hidden" name="id[3]" value="9">

```

The issue is that I need to pass the two hidden vars ( products\_id and id[3] - wich is atrributes of the product ( may be size, color or whatever )

I’m making my first test with 50% success.  
My flash code is follow:

```auto
 
 
boton.onRelease = function(){
 products_id="26";
 id[3]=9;
 getURL("http://www.shop.com/product_info.php?products_id=24&action=add_product", "", "POST");
}
// Possibility two /////////////////////////////
sendVars = new LoadVars();
sendVars.products_id="26";
sendVars.id[3]=9;
boton2.onRelease = function(){
 sendVars.send("http://www.shop.com/product_info.php?products_id=24&action=add_product", "POST");
}
 

```

Ok, products\_id does pass OK  
but id[3] value doesn’t pass.  
May be the [3] is the problem, but I can`t change that  
i MUST pass the hidden value id[3]  
HELP!

UPDATED 2 hours later:

i made a few tests more:

tryed this:  
products\_id=“26&id[3]=9”;

tryed this:  
products\_id=“26&id=[,9]”;

tryed this:  
products\_id=“26&id=(,9)”;

tryed this:  
products\_id=“26”;  
id="[,9]";

BUT NEVER SUCCEDDED
