Jump to content

HTML and PHP mixed


tr3x86

Recommended Posts

Hello All,

 

I have a quick question that I'm sure you guys could answer instantly...

 

I'm building a website in HTML. I have a couple of forms, but want to be more dynamic in the way they're handled and emailed. PHP does a pretty good job of executing nice form mailing.

 

What I'm not sure about... in your experience, can you think of any problems in terms of performance, SEO, etc. if the website has mixed page extensions?

 

Example:

 

index.html

about.html

contact.php

product.html

 

Any input would be greatly appreciated.

 

Thanks,

 

Tyler

Link to comment
https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/
Share on other sites

.php extension will be parsed as .html except where php tags are encountered:

 

filename: somefile.php

 

<HTML>
<BODY>
Hello World<BR>
<?php
echo 'Hi, How Are You?<BR>';
?>
<B>I'm fine. How are you?</B><BR>
</BODY>
</HTML>

 

you shouldn't need to do anything with .htaccess to use HTML in your PHP files, using .php extension everywhere.

Link to comment
https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/#findComment-629208
Share on other sites

i never knew and never noticed a difference. but if that's the standard, i'll switch.  :)

 

fo shizzle: http://www.htmlbasictutor.ca/html-tag-attributes.htm

 

thanks for pointing that out, folks. learn something new (at least) every day.  :)

 

It's the standard, yes.  It doesn't have the same meaning in XHTML because of case-sensitivity.  Have you tried validating your pages?

Link to comment
https://forums.phpfreaks.com/topic/121921-html-and-php-mixed/#findComment-629224
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.