". "". "". ""; $result = mysql_query($query,$conn)or die("Error"); if (mysql_num_rows($result)>0){ while ($row = mysql_fetch_assoc($result)){ $xml .= "{$row['Hash']}". "". "Name". "{$row['Name']}". "Category". "{$row['Category']}". "Genre". "{$row['Genre']}". "Language". "{$row['Language']}". "Age". "{$row['Age']}". ""; } $xml .= "". ""; echo $xml; //header('Content-type: text/xml'); // $domdocument = new DOMDocument('1.0', 'UTF-8'); // // $domdocument->LoadXML($xml); // $domdocument->formatOutput = true; // $data = $domdocument->saveXML(); // $zip = new ZipArchive(); // $filename = "test.zip"; // // if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) { // exit("cannot open <$filename>n"); // } // $zip->addFromString("result.plist",$data); // $zip->close(); // header("Content-Type: application/zip\n"); // header("Content-Disposition: attachment; filename=\"".$filename."\""); // readfile($filename); } }else die('enter data'); ?>