Re: updating textbox based off dynamic drop down list from D
Posted: Tue Oct 25, 2011 12:13 am
Ah,great discussions so far...Hope that VFDinc got the idea for solving that pblm.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
I have to disagree, create index.html with the following code:califdon wrote:I'm afraid that's incorrect. PHP can be embedded anywhere in an HTML document, as long as it is preceded and followed by the opening and closing tags ( <?php and ?> ). It is very common to include several blocks of PHP code at various points within an HTML document.
Code: Select all
<html>
<head>
<title>test</title>
</head>
<body>
<?php echo 'hello world!'; ?>
</body>
</html>That works perfectly fine with any server that is configured to interpret PHP and recognize whatever filetype you saved it as. Now, if you want to quibble and say that it doesn't work if you use a filetype that the server isn't configured to recognize, I don't consider that a useful comment. It also wouldn't work if you named it index.txt. Most web servers are configured to recognize .php filetypes, but some sysadmins prefer to recognize other filetypes, too, such as .htm or .html. That's merely an option for the sysadmin. It's not a PHP issue, it's a server configuration issue. The point of my comment was to correct an incorrect statement to the effect that any PHP code had to precede any HTML code in the same file, which is simply not true.manohoo wrote:I have to disagree, create index.html with the following code:califdon wrote:I'm afraid that's incorrect. PHP can be embedded anywhere in an HTML document, as long as it is preceded and followed by the opening and closing tags ( <?php and ?> ). It is very common to include several blocks of PHP code at various points within an HTML document.Explain then why the above does not produce any output.Code: Select all
<html> <head> <title>test</title> </head> <body> <?php echo 'hello world!'; ?> </body> </html>