Hi,

to make sure it is not the browser fooling you, how about trying a different tool to capture the output? I am using curl quite often, and believe it is available for windows too

BTW: when I ran your script right away, I got a mysql error (of course, I do not have the database set up) plus an empty xml container
Code:
<?xml version="1.0"?>
<payments>
</payments>

Musicman