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