It seems to me that Apache isn't regognizing your PHP pages as PHP pages, passing the PHP code to the browser as HTML. - Check the source of the blank page you get when you run the code in your last post. Is the code show in the source?
Typically, to get Apache to execute PHP code, you need to enable the Apache PHP module. You can do that by adding the following to the Apache configuration file. (Usually
"conf/httpd.conf" under your Apache install directory. It can also have the .ini extension on Windows.)
- LoadModule php5_module modules/php5apache2_2.dll
-
AddType application/x-httpd-php .php .phtml .php3
-
AddType application/x-httpd-php-source .phps
(The path in the first line may vary, depending on your OS and PHP install method.)
Edit.
Just noticed that you are using XAMPP. Seeing as it should have taken care of installing PHP for you (in it's own unique way), you may want to just re-install XAMPP.