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 / May 2005



Tip: Looking for answers? Try searching our database.

Flash & PhP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
v_teo - 20 May 2005 15:56 GMT
Hi. I am bothering you again because I really need to know how to make flash
and php talk WITHOUT using amfphp... I would apreciate any help as I tried to
follow other's help and did not do anything... The PHP file :

------------------------------------act.php-------------------------------------
--
<?php
$host = "localhost";
$user = "root";
$pass = "23121987";
$conn = mysql_connect($host,$user,$pass);

$tot = mysql_query("Select * from kappa1987_membri.tabel",$conn);

while ($k=mysql_fetch_row($tot))
{
for ($i=0;$i<count($k);$i++)
{
print "&k[$i]=";
print $k[$i];
}
print "\n";
}
?>
----------------------------------------------
works perfectly(written by hand  )
But, because the result an array of records, I'm not sure how to do...So
please explain to me how to do it...I would be very thankful...

Regards,
N0L|m|tz
P.S. Sorry for the bothering but I really need to know how to do this...
Joaquim Lopes - 21 May 2005 20:58 GMT
You coulod change your PHP code to this:

<?php
$host = "localhost";
$user = "root";
$pass = "23121987";
$conn = mysql_connect($host,$user,$pass);

$tot = mysql_query("Select * from kappa1987_membri.tabel",$conn);
$result = "&myArray=";

while ($k=mysql_fetch_row($tot))
{
for ($i=0;$i<count($k);$i++)
{
$result .= $k . "|"; // Use a character that you know will not be present in
the text
}
print $result;
}
?>

Then on the Flash side use

results = myArray.split("|");
numElements = results.length;

Hope this helps.
adireddy - 23 May 2005 09:36 GMT
Refer http://www.devarticles.com/c/a/Flash/The-Power-of-LoadVars-Object/ to know how to communicate between PHP and Flash.
 
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.