PHP into Flash problem

here's the questions thread...

http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_21198924.html

i will accept this question and the other thread if you can help me.

thanks
jmingoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BuffonCommented:
Flash:
var vars:LoadVars = new LoadVars();
vars.onLoad = function(success)
{

}
0
BuffonCommented:
try this:

Flash:
var myVar:String = "";
var vars:LoadVars = new LaodVars();
vars.onLoad = function(success)
{
      if (success)
      {
            myVar = this.test;
      }
}
vars.load("test.php");

PHP:
echo "&test=blabla"
0
jmingoAuthor Commented:
seems like i've tried everything. here is my php code. i'm getting the data out of the database. i'll try the flash code above.

<html>
<head><title>Flash Test</title></head>
<body>

<br><br>

<?php

//phpinfo();

error_reporting(E_ALL);

$user = $HTTP_GET_VARS['user'];
$subject = $HTTP_GET_VARS['subject'];

$link = mysql_connect('localhost', 'mailer', 'mailer321')
   or die('Could not connect: ' . mysql_error());

mysql_select_db('mailer') or die('Could not select database');

$query = "SELECT * FROM email where name = '$user' and subject = '$subject' order by id desc limit 1";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

while ($rows = mysql_fetch_array($result)) {

$name = $rows['name'];
$email = $rows['subject'];
$content = $rows['content'];

}

print "&name=$name";
print "&email=$email";
print "&content=$content";

mysql_free_result($result);

mysql_close($link);

?>

<div align="center">

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="760" HEIGHT="430" id="winstorm" ALIGN=""><PARAM NAME=movie VALUE="test.swf?name=<? echo $name ?>&email=<? echo $email ?>&content=<? echo $content ?>"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#EEEEEE><EMBED src="test.swf?name=<? echo $name ?>&email=<? echo $email ?>&content=<? echo $content ?>" quality=high bgcolor=#EEEEEE  WIDTH="760" HEIGHT="430" NAME="winstorm" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

</div>

</body>
</html>
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

jmingoAuthor Commented:
tried this code you said below, and nothing different happened.

var myVar:String = "";
var vars:LoadVars = new LaodVars();
vars.onLoad = function(success)
{
     if (success)
     {
          myVar = this.test;
     }
}
vars.load("test.php");
0
jmingoAuthor Commented:
i tried this very simple script and it didn't work... but it worked on a friends server (that has BSD) but not my mandrake server... do i need to install some module???

<?php
//The value of $x would be printed to the screen but the SWF would not read the data
$x = "Content read from php file";

//The value of $x would be printed to the screen and because of the prefix 'myVar=', the SWF will //interpret this as being the intended value for the variable myVar in the SWF
print "content=$x";
?>
0
BuffonCommented:
0
jmingoAuthor Commented:
found out what was wrong, it was looking for the php file in the root directory on my webserver.

had to change it to an absolute link in flash

thanks
0
moduloCommented:
Closed, 25 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.