If there are errors diaplyed, that means your code has problems. If there are no errors, then yes, it could be an XAMPP problem. In which case you'd have to look in the Apache logs to where the issue is.
It looks very much like the PHP codes isn't being executed at all, but just being sent to the browser. That usually happens because of one of tow things:
First, because people new to these things simply open a .php file in their browser like they would a .html file, thus bypassing the HTTP server altogether. Make sure your URL looks something like http://localhost/file.php, rather than something like file:///C:/path/to/file.php.
Or, second, because your HTTP server is poorly configured and doesn't recognize PHP code. In this case, you'd have to dig into the config to find out why that's happening, which requires some know-how about your chosen server. - For XAMPP, this is rarely an issue, as it takes care of setting the HTTP server up for you.
This post has been edited by Dormilich: 21 June 2012 - 11:26 PM
Reason for edit:: typo