Click to See Complete Forum and Search --> : Get POST values from flash to PHP


salim
08-22-2008, 02:09 AM
Hi All

I am having a flash UI that posts two values to the php page.
Two values are name and email

System.useCodepage = true;

Outdata.Username=nam; //My input fields
Outdata.Email=email;

if(nam!=undefined and email!=undefined)
{
Outdata.sendAndLoad("signin.php", Indata, "POST");
}


This is my php code

$Username= $_POST['Username'];
$Email= $_POST['Email'];
echo $Username;
echo $Email;
exit;


But when i echo i am not able to see the posted values from flash.

Is my flash script not correct??

Thnx in advance

ratcateme
08-22-2008, 04:23 AM
i suggest you have a problem in flash use wireshark or firebug (in firefox) to see what is happening behind the flash app so you can tell if it working wright the script you have say user is "test" and email is "test@test.com" will output one long string "testtest@test.com"
properly not what you want
echo $Username."\r\n";
echo $Email."\r\n";
will output
"test
test@test.com
"

Scott.

salim
08-22-2008, 06:09 AM
Hello Scott.

Thanks for the reply

I solved it. Problem was with my php page location.

somehow screwed the path :D

Thnx again