Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / April 2008



Tip: Looking for answers? Try searching our database.

LoadVars-using send to pass a variable from flash to php

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MYSCREENNAMEISUNAVAILABLE - 25 Mar 2008 01:34 GMT
For the life of me, I've tried everything:
I've researched LoadVars on Adobe forum, used David Powers' books, googled
'flash to php', LoadVars, etc. and tried sendAndLoad, send, and using $_POST,
$_GET, $_REQUEST. $HTTP_POSTVARS but I keep getting this same error. any advice
please?

My goal with this simple app is to prototype being able to pass a variable
from flash to a variable in php.

Parse error: syntax error, unexpected T_VARIABLE in flash_to_SQL.php on line 5

Actionscript 2.0 code:

var c :LoadVars = new LoadVars();
c.testing = "123FOUR";
c.send ("http://127.0.0.1/flash_to_SQL.php","_self","POST");

php code: (I also tried $_POST, $_GET, $_REQUEST. $HTTP_POSTVARS)
<?php

//mysql 4.1.2, php 4 , NO mysqli

ecbo $_REQUEST ['testing'];
/?>
acframe - 25 Mar 2008 14:07 GMT
ecbo? shouldn't that be echo? :)
Jefferator - 01 Apr 2008 03:32 GMT
Not sure it is making it to ecbo...
durand - 04 Apr 2008 14:51 GMT
var formData:LoadVars = new LoadVars();
formData.fname = "Name";
formData.send("http://www.website.com/flash_php.php", formData, "POST");

<?php
$name  = $_POST['fname'];
echo $name;
?>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.