I have gotten it to work locally using php/mysql on a Mac, but when I upload it to my hosting server, I get the dreaded "gallery not found". Maybe someone can help me out with this as well.
Here is the php that grabs from the database and prints out xml:
<?php
header("Content-type: text/xml");
$host = "localhost";
$user = "your_usrname_here";
$pass = "your_passsword_here";
$database = "your_database_name_here";
$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database, $linkID) or die("Could not find database.");
$query = "SELECT * FROM tablename ORDER BY seq ASC";
$resultID = mysql_query($query, $linkID) or die("Data not found.");
$xml_output = "<?xml version="1.0" encoding="UTF-8" ?>n";
$xml_output .= "<simpleviewerGallery maximageHeight="640" maximageWidth="640" textColor="0xFFFFFF" frameColor="0xffffff" frameWidth="10" navPadding="20" stagePadding="30" thumbnailColumns="3" thumbnailRows="3" navPosition="left" title="" enableRightClickOpen="false" backgroundimagePath="" thumbPath="" imagePath="">n";
for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= "t<image>";
$xml_output .= "tt<filename>" . $row['filename'] . "</filename>";
$xml_output .= "t</image>n";
}
$xml_output .= "</simpleviewerGallery>";
echo $xml_output;
?>
so in your html ad a variable to the swfobject code to find the xmldata like so...
<div id="gallery">Requires Flash</div>
<script type="text/javascript">
var fo = new SWFObject("viewer.swf", "viewer", "100%", "100%", "8", "#000000");
fo.addVariable("xmlDataPath", "gallery.php");
fo.write("gallery");
</script>
It works like a charm on my machine but not on my server. I've tested the php file and it writes the xml perfect. I've checked and safe mode is off and XML parser functions are on, etc. etc.
Anyway, you are welcome to it. Maybe you can solve my problem.