Page 1 of 1

php in html

Posted: Sun Nov 01, 2009 3:11 pm
by cool_sni
I am trying to embedded php into a html.

Here's the test code.

<html>
<body>
hello <BR>
<?php
echo "world is evil";
?>
</body>
</html>

I only see hello , text in echo doesn't appear on the browser.
I am not sure what is wrong with this.
Please let me know how to fix this

Re: php in html

Posted: Sun Nov 01, 2009 3:45 pm
by cpetercarter
What is your script called? It should have the termination .php (not .html) if it is to parse php.

Re: php in html

Posted: Sun Nov 01, 2009 5:42 pm
by cool_sni
I had the ext as html, I changed it to php and it works.
Thank you cpetercarter for your quick advice.