\n"; $content .= "\n"; $content .= "\n"; if ($number > 0){ while ($i < $number){ $cname = mysql_result($result, $i, "cname"); $pname = mysql_result($result, $i, "pname"); $tdate = mysql_result($result, $i, "tdate"); $tqnt = mysql_result($result, $i, "tqnt"); $content .= "\n"; $content .= "\n"; $content .= "$cname\n"; $content .= "$pname\n"; $content .= "\n"; $i++; } } $content .= "\n"; $file = fopen("tmp.xml", "w"); fwrite ($file, $content); fclose($file); /* Close the database connection */ MYSQL_CLOSE(); /* Create an XSLT processor */ $xsltHandle = xslt_create(); /* Perform the transformation */ $html = xslt_process($xsltHandle, 'tmp.xml', 'transactions.xsl'); /* Detect errors */ if (!$html) die('XSLT processing error: '.xslt_error($xsltHandle)); /* Destroy the XSLT processor */ xslt_free($xsltHandle); /* Output the resulting HTML */ echo $html; ?>