Re: embedded PHP in HTML
| From: | Justin Patrin | Date: | Fri, 12 Dec 2003 16:29:09 +0000 |
| Subject: | Re: embedded PHP in HTML | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-22375@lists.php.net to get a copy of this message | ||
Piotr Pluciennik wrote:
Try this way... remove <script language="php"> and </script> <html> <head> </head> <body> <p>trying to call PHP.</p> <?php echo "hello there"; ?> </body> </html> HTH Piotr --- Ahmad Khashan <akhashan_or@yahoo.com> wrote:Yes, PHP is not a client-side scripting language, it is server side. (<script> is used for client-side scripting.) Is this in a file with a .html or a .php extension? Were the ones that worked .php? I would suggest, 1) using a .php extension for all PHP scripts. This won't change how they're displayed in the browser. If you don't want that, change your webserver's configuration to parse .html files as PHP scripts. -- paperCrane <Justin Patrin>I am trying to get this code to work: <html> <head> </head> <body> <p>trying to call PHP.</p> <script language="php"> <?php echo ("hello there"); ?> </script> </body> </html> The PHP code is not executed. Any way to get this to work?. BTW, I can execute PHP files if i use the form....action...submit route. Many thanks.... --------------------------------- Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing__________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/