Need Help With PHP

Articz

New Member
Messages
864
Reaction score
0
Points
0
hey there people i need to know if it is possible to add PHP coding to an HTML page. i need to add a bit of php into my site but its written in HTML. all ending with .htm or .html

please help thx in advance

*EDIT

Woot This Is My 200th Post Here
 

Akkarin

New Member
Messages
1,654
Reaction score
0
Points
0
I'm not sure really put you might be able to have a PHP Include whilst still keeping the filename a ".html", or you could call it a ".php" and the HTML will still work.

Sorry I can't confirm any of this since I'm not v. good with PHP.
 

Articz

New Member
Messages
864
Reaction score
0
Points
0
how would i go about adding a php include into html. would i have to add anything before or after the include or not?

thx agian
 

Akkarin

New Member
Messages
1,654
Reaction score
0
Points
0
Not really sure how to explain fully could you give a bit more detail as to what you want to add to the page.
 

Broomba

New Member
Messages
6
Reaction score
0
Points
0
no, not unless the extension *.html is set to execute php code by the server... which it most likely isn't. You'd be best to turn your html into a frame for your new php file, and then insert the code:
Code:
<script language = javascript type = "text/javascript">
<!-- 
if (top.location != self.location) {
top.location = self.location
} 
// -->
</script>
into your new php page, which will break the frames, revealing the new page.
Or just stick in a javascript redirect.... kinda boring though :p
 

r0gUe

New Member
Messages
84
Reaction score
0
Points
0
erm i duno what the post above says but im sure u can add php u start a htm page then u save it as .php then in the body u edit what u need but u must keep the
Code:
<html>
<head></head>
<BODY>
;(here u can do ur php)
;example:
<?
echo "hello world";
?>
</BODY>
</html>

this is just example but this is how u do it if u want the page to be php + htm/html
 
Top