I have this php file that formats my the xml how I want it from my db. My question is...how do I save this onto my server? When I enter this file I want it to save automatically one directory up in "shows". How do I do that?
<?php
// first connect to database
$dbcnx = @mysql_connect("*", "", "****") or die(mysql_error());
$dbselect = @mysql_select_db("slideshow") or die(mysql_error());
// next, query for a list of titles, files and links.
$query = "SELECT title,description FROM slideshow";
$result = mysql_query($query) or die('Error: '.mysql_error());
// third, build the playlist
header("content-type:text/xml;charset=utf-8");
echo "<playlist version='1' xmlns='http://xspf.org/ns/0/'>\n";
echo "<trackList>\n";
while($row = @mysql_fetch_array($result)) {
echo "\t<track>\n";
echo "\t\t<title>".$row['title']."</title>\n";
echo "\t\t<location>".$row['description']."</location>\n";
echo "\t</track>\n";
}
echo "</trackList>\n";
echo "</playlist>\n";
?>