I guess - You can pass any kind of information from PHP to HTML. But HTML can not pass any information to PHP.
Remember:
-----------------
PHP is a server side language and HTML is a client side language so PHP executes on server side and gets its results as STRING, ARRAYs, OBJECTS or so and then we use results to display its values in HTML.
PHP processor scans the page, character by character.
Until a <? PHP is found the text is sent directly to the web server in a type of copy mode.
(this text may be HTML, XML, JavaScript, or anything else).
Once in a <? PHP is found the input is directed to PHP, which does whatever it will with it.
Any "print" output from PHP is sent to the outgoing http stream.
Once a ?> is found the stream reverts to the original copy mode.
PHP has the ability to send HTML, CSS, JavaScript, or anything else. You may need to force content type, but it can be done.
من قبل
Mohamed Hassan , Senior Application and Integration Developer , IBM
HTML is the language that gives what you get from database by PHP the look in the browser , or in another mean
HTML is the language that make the user interact with indirect with the server throw PHP, and without it user will not be able to do that
من قبل
Hazem Salama , Senior Member of Technical Staff , Verizon Communications
HTML is a MARKUP language, so it does NOT interact with anything! PHP is a server-side language that generates the HTML that is sent back to the client (the browser)!
When the webserver receives a request for a page with a .php extension, it forwards the request to the PHP engine, which in turn parses the file requested (index.php for example) and processes anything in between the <?php> tags, and then puts all together as HTML and sends it back to the browser, since this is the only thing the browser will understand. This is very simplified of course, but you get the picture.