Tried escaping the & characters also tried \"&"\ and '&' and and "&" and lastly '*'
This is how I managed to get the Data to Display correctly in flash IF is don't use ahref's
So I applied the \& as suggested but no luck... also i dont think this is using the XML way
Here is how its Works Now:
PHP Code:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'on');
$db = sqlite_open("Databasenamehere.db", 0666, $sqliteerror)
or die($sqliteerror);
//echo "<p>Recent Posts</p>";
$sql = "SELECT * FROM phpbb_posts ORDER BY post_time DESC LIMIT 15";
//echo "<p>Query: " . $sql . "</p>";
$recent = sqlite_query($db, $sql)
or die(sqlite_error_string(sqlite_last_error()));
$Passtoflash = "<?xml version=\"1.0\"?>";
//$Passtoflash .= "<posts>\n";
while ($recent_row = sqlite_fetch_array($recent, SQLITE_ASSOC))
{
// get data
$post_id = $recent_row['post_id'];
$topic_id = $recent_row['topic_id'];
$forum_id = $recent_row['forum_id'];
$poster_id = $recent_row['poster_id'];
$post_time = $recent_row['post_time'];
// get topic name
$topic_name = sqlite_query($db, "SELECT topic_title FROM phpbb_topics WHERE topic_id='$topic_id'");
$topic_name = sqlite_fetch_array($topic_name);
$topic_name = $topic_name['topic_title'];
// get username
$username = sqlite_query($db, "SELECT username FROM phpbb_users WHERE user_id='$poster_id'");
$username = sqlite_fetch_array($username);
$username = $username['username'];
//var for flash txt box is "toflash"
$Passtoflash .= "<b>$username</b> Posted in the $topic_name Forum Thread<br />";
}
//$Passtoflash .= "</posts>";
echo "&toflash=$Passtoflash";
?>
Here is the Problem when I add <ahref> tags with & in them
PHP Code:
While (commend for Sqlite DB is here (didnt change any code there))
}
//here is the actual line that needs to be used in the end
$Passtoflash .= "<b>$username</b> Posted in the <a href ='http://microfusion.mine.nu/forums/viewtopic.php?$forum_id\&$topic_id\&p=$post_id#p$post_id'>$topic_name</a> Forum Thread<br />";
{
echo "&toflash=$Passtoflash";
?>
basically PHPbb3 used this "&" in its forum structure, the idea is that if the users click on the Dynamically updated posts it will take them there. now it works in HTML if i load up the PHP page outside flash
Flash parse "&" char's in the <ahref> as Variables LOL
If I Can remember the XML way I couldn't get it to work that's why its commented out
I don't mind going the XML route but My lack of XML knowledge will only make matters worse if I attempt it... soooo Any Idea's?