FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP CODE INCLUSION





Scorpio
Is it possible to include a php code in a html page.

If so how and what should be done?

Thank you Smile
BlackSkad
Euhm, I think you missed some crucial php-lessons Very Happy
You can easily embed your php in you're html in this way (and not the other way round):
Code:
<!-- html-code here -->
<?php
    //php-code here
?>
<!-- html-code here -->

So embedded php is always between <?php and ?>, and you need to name the file with an .php extension.

BlackSkad
Rhysige
What those guys said.. whenever you want to use PHP just put <?PHP then your PHP code then ?>
If you just want to include pages in HTML pages I suggestion you look at Server Side Includes (SSI)
Scorpio
Thank you for that.
A Little confusion cleared up
abhinav_shah
The font color is real bad... are you testing eye sight or what ?
Scorpio
What font color are you talking about?
Related topics
Show PHP Code
Php Code Trouble Set-up
Simple PHP forum code needed!
PHP include code problem
mySQL Query/PHP code - get the highest value...
my PHP code benchmark script that got some problems
PHP code snippit?
CSS for making images go through a php code.
Gradient Fill Cell
What is a good or bad php code?
I want PHP Code to ......
Help With Simple PHP Code Snipit
removing DirectAdmin part of URL makes php code work
Highlight PHP-code in a HTML-document
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.