Forum Moderators: coopster

Message Too Old, No Replies

include php action in html

include php action in html

         

exit

11:04 am on Oct 31, 2003 (gmt 0)



Can *.php?action=... be included into html or to other .php?
if it is posible, how to do it?
Sorry I am new in php, so I do not know about this.

Thanks

coopster

12:58 pm on Oct 31, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Sure can, use the PHP include function [us4.php.net].

Note: If you are intending to have the include in a .html document, it won't work unless your PHP parser is set to parse .html file extensions. Easiest workaround for this is to rename the .html file with a .php extension instead. However, you'll find plenty of threads by searching this forum for how to parse .html files with PHP.

jatar_k

5:35 pm on Oct 31, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld exit,

include, as coopster mentioned, would look something like this

<? include "scriptname.php?action=display";?>

that would put the output from scriptname.php into the html page wherever you put that line, as long as the page is php parsed.