Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending vars from php/mysql to flash

Status
Not open for further replies.

dkribbehotmailcom

Programmer
Apr 16, 2003
1
NL
Im busy building a php/mysql website using flash as navigation. I'm trying to get some vars from php into flash. This works as long as i say for example: echo "&title=FlashNav"; The dynamic textfield named title in flash shows "FlashNav" so the connection between flash and php works correctly.
But If a want to dsiplay a field out of my mysql table, Flash shows a empty textfield. I'm using te following code:
$perrij=mysql_fetch_array($resultaat);
$title=$perrij["name"];
echo "&title=$title"

Can anyone tell me why this doesnt work, in the php file it's echo'ing the right content but flash doesnt show anything.
Please help me
 
without seeing the rest of the query its kind of difficult to pinpoint but the syntax looks dodgy

$resltaat = mysql_query("SELECT * FROM......//whatever you have here ");
$nrows = mysql_num_rows($qr); //this may only be 1
$rString = "n=".$nrows;

for ($i=0; $i < $nrows; $i++) {
$row = mysql_fetch_array($qr);
$rString .= &quot;&whatever&quot;.$i.&quot;=&quot;.$row['whatever'].&quot;&something else&quot;.$i.&quot;=&quot;.$row['something else'];
$rString .= more attributes
}
echo $rString
 
this works for me...just tested it and writes to flash just fine

$resltaat = mysql_query(&quot;SELECT * FROM......//whatever you have here &quot;);
$nrows = mysql_num_rows($resultaat); //this may only be 1
$rString = &quot;n=&quot;.$nrows;

for ($i=0; $i < $nrows; $i++) {
$row = mysql_fetch_array($resultaat);
$rString .= &quot;&whatever&quot;.$i.&quot;=&quot;.$row['whatever'].&quot;&something else&quot;.$i.&quot;=&quot;.$row['something else'];
$rString .= more attributes
}
echo $rString





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top