when i inspect the element using chrome the php seems to be commented out
The PHP is not passing through a PHP parser before getting to the browser, so the browser is receiving the PHP code instead of the server executing it.
Make sure that:
- You are loading the page over HTTP (e.g. not just double clicking the file in your file manager)
- The server you are using supports PHP
- The server is configured to treat the file as PHP (this is usually done by giving it a .php file extension)