I am fairly new to php
but i do have some knowledge of it
im justnot sure how to code what i want.
if anyone can give me some idea of what code i need i'd really appriciate it :)
anyway
photo names will be uploaded to database with a catagory id "live music", "landscapes", "custom names".
a flah file will read an xml file which will then start echoing the correct data for the flash file to present.
i need it to go somthing like "if the catagory id = live music
echo all photos in that album with the catagory id then do the same for each one.
i have this so far
<gallery title="Tony's Photo Album" thumbDir="./images/thumbs/" imageDir="./images/" random="true">
<category name='Live Music'>
<?php
include ("include/connect.php");
$query = "SELECT * FROM photo ORDER BY id DESC";
$result = mysql_query ($query) or die ("Error in query: $query. ".mysql_error());
while ($row = mysql_fetch_array($result))
{
echo "
<image>
<date>".$row['date']."</date>
<title>".$row['title']."</title>
<desc>".$row['description']."</desc>
<thumb>".$row['thumb']."</thumb>
<img>".$row['image']."</img>
</image>
";
}
?>
</category>
</gallery>