Scott De Leeuw wrote:

I work with Windows... when I have tested it I do go through the
web browser...

If I go to a strict PHP file it all works... However, the PHP
book I am reading shows also embedding php in an HTML file the
same way that you do javascript, is that not possible?

Yes it is possible. If by "strict PHP file" you mean one with a ".php" extension then your webserver configuration should send that to the PHP engine before sending it to the browser. (If you are seeing the PHP source then you have not configured this). With an ".html" file it usually does not (as they do not normally contain PHP code). You can configure your webserver to send ".html" files to the PHP engine if you wish to. The disadvantage is that there is more processing as all ".html" files will have to be parsed.

You have to tell your webserver to do this as PHP is executed on the server. In the JavaScript case, the server does nothing but send it to the browser. It is the browser (client side) that interprets the JavaScript.

HTH
Chris


--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to