Hi,
I am a new bie in this php thingy. Now I am developing my feeback form in my website. It has Name, Company, Email, City, Country, Where did you hear abt us, and last feeback message? All the details entered in the respective fields should come to my email id. I have done whole website in flash.
Can anybody here help me in creating the PHPscript and its integration with flash?
Regards,
Gonnan Travis
Hi- a good way to send variables back and forth from flash to php is by using Flash’s LoadVars object. The basics are as follows:
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean) {
if (success) {
trace(this.var1+" "+this.var2);
} else {
trace(“Error loading/parsing LoadVars.”);
}
};
my_lv.load(“http://www.yourdomain.com/yourscript.php”);
PHP returns variables to flash with by echoing a param/value pairs:
<?php
echo “var1=hello&var2=world”;
?>
Use sendAndLoad() or the send() functions of LoadVars to send params back to php.