# I wanna send a dynamic variable from flash to php... plz help me i given code too

**URL:** <https://forum.kirupa.com/t/i-wanna-send-a-dynamic-variable-from-flash-to-php-plz-help-me-i-given-code-too/294038>\
**Category:** Uncategorized\
**Created:** [August 7, 2009, 10:05am UTC](https://forum.kirupa.com/t/i-wanna-send-a-dynamic-variable-from-flash-to-php-plz-help-me-i-given-code-too/294038 "2009-08-07T10:05:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaganpon](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jaganpon](https://forum.kirupa.com/u/jaganpon)\
**Post date:** [August 7, 2009, 10:05am UTC](https://forum.kirupa.com/t/i-wanna-send-a-dynamic-variable-from-flash-to-php-plz-help-me-i-given-code-too/294038/1 "2009-08-07T10:05:33Z")

</div>

And i m struggling for this past 5 days without knowing the solution  
**AS3 script**  
i wanna send a dynamic variable from flash to php…

**this work gr8**  
//////////////////////// flash file  
var propertydescPageText:String;

var propertydesc\_variables:URLVariables = new URLVariables();

var propertydesc\_varSend:URLRequest = new URLRequest(“cms\_control\_file.php”);

propertydesc\_varSend.method = URLRequestMethod.POST;

propertydesc\_varSend.data = propertydesc\_variables;

var propertydesc\_varLoader:URLLoader = new URLLoader;

propertydesc\_varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;

propertydesc\_varLoader.addEventListener(Event.COMP LETE, propertydesc\_var\_comp);

propertydesc\_variables.sendRequest = “get\_propertydesc\_texta”+i;

propertydesc\_varLoader.load(propertydesc\_varSend);  
var propertydescPageText2:String;  
function propertydesc\_var\_comp(event:Event):void {  
propertydescPageText = event.target.data.property\_description\_text;  
box2\_txt1.htmlText=""+propertydescPageText;  
}  
///////////////////////php file ///

if ($\_POST[‘sendRequest’] == “get\_propertydesc\_texta”.$i) {

```
$sql = mysql_query("SELECT property_description FROM realestate_fp WHERE fp_id='$i'");
while($row = mysql_fetch_array($sql)){
       $property_description=$row["property_description"];
      print "property_description_text=$property_descripti on";
}

} ////////

```

in this php file i want to change “$i” dynamically… which the data from from flash should update… i dnt know how to do… when i give 2 then database should fetch fp\_id =2, if i give 1 ishoud get fp\_id 1… plz help me
