
Originally Posted by
SoulSe
I use PHP all the time for news, guestbooks, polls, etc. on my site. I also use Flash for cool effects and interaction.
So what I am trying to do now is find a way to incorporate the two, so that I can use Flash for the 'face' of the site and PHP for the dynamic content.
I have googled all over and all I have found are a few examples of scripts that have been setup, but no good generic advice for achieving this.
I am not great with code, but I get by. All I am looking for is a how-to that could help me figure out how to get the content called from PHP and incorporated into my Flash movies.
Any help would be appreciated...
I do alot of this type stuff and my PHP coding stinks but for talking to flash this is the basic approach... I amtalking to Flash 4 by the way
PHP Code:
<?php
include("aconstants.inc");
$precheck = mysql_query("SELECT SUM(new) AS num_new FROM mailroom");
$row=mysql_fetch_array($precheck);
$sum= $row["num_new"];
if($sum < "1") {
$newmail= "0";
$report= "newmail=";
$report .= rawurlencode($newmail);
echo("$report");
} else {
$newmail= $sum ;
$report= "newmail=";
$report .= rawurlencode($newmail);
echo("$report");
}
?>
For multiple variables use "&" without quotes to seperate variables
ie: $report&$report2&$report3 and so on.
Bookmarks