I'm not sure that I understand what's going on, but you may want to print out the HTTP headers at the very beginning. It looks like maybe some other output is being sent before the header lines.
I'm confused about "command prompt here again" at the end. Are you saying that there's a command prompt in your web page?
buckaduck
Comment on Re: i'm getting this error message on the webpage