morning guys. sorry to post such a simple question but i know nothing about this side of php. need to start using xml data eventually so thought i'd learn some basics!
i normally export my data using variable for flash but want to use xml for the one below...
example of how it looks now;
http://thegoodbyeplot.com/blogger/flashblog.php
how would i format this php to create xml format? and maybe save a copy(in xml format) file to a location.
many thanks.
D.
<?
include("goodbye_conn.php");
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_select_db($db) or die ("Unable to select database!");
$query = "SELECT * FROM goodbye_blogger ORDER BY newsyear DESC, newsmonth DESC, newsday DESC, id DESC";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
while ($row = mysql_fetch_array($result)) {
$idb = $row['id'];
$title = $row['title'];
$info = $row['info'];
$filename = $row['filename'];
$link = $row['link'];
$newsyear = $row['newsyear'];
$newsmonth = $row['newsmonth'];
$newsday = $row['newsday'];
$x++;
$title=str_replace("&","%26",$title);
$display_block_l .="&blogim$x=$filename&blogtitle$x=$title&blogcopy$x=$info&<br>
";
}
echo "$display_block_l &totnews=$x"; ?>