Page 1 of 1

how to include php function in html page

Posted: Sun Mar 21, 2004 1:04 am
by jigaruu
i have got a function ready in my php page and the same is need to be called in the html page,

the function does the work of displaying the image and counts and do many other work,

so i need to run that particular function in particular <TD> tag. so can any one help me to include the same and also how to include the files supporting that php page in the html page.

thanks in advance.

Posted: Sun Mar 21, 2004 10:21 am
by doeboy
If you are wanting to call/use php functions, the file must be a .php file. Just rename your.html file to .php and you will be fine.

Posted: Sun Mar 21, 2004 3:18 pm
by werlop
Remember you can jump in and out of php simply by using the <?php ?> tags.

eg

<html>
<?php
// Whatever
?>

<head>

etc......


</html>



This will work fine as long as you save as .php

or you could modify the Apache config to allow php to parse .html files instead of or as well as .php files