Click to See Complete Forum and Search --> : simple include question


oo7ml
08-03-2007, 12:30 PM
My site consists of over 30 pages, and each page has the same footer (ending)

I was thinking of adding an include <?php include("footer.php");?>


Does it matter what code is in the footer.php e.g

say it includes the closing </table> </body> and </html> tags

<tr>
<td>
<p> this is the footer </p
</td>
</tr>
</table>
</body
</html>

but it doesn't have the opening <html> <body> <table> tags

Is this bad coding practice because i don't have the opening tags in it as well or does it matter?

PLEASE EVERYONE ANSWER AS I THINK THIS COULD BE VERY OPINIONATED

JDM71488
08-03-2007, 12:34 PM
i've been doing this for 5 years... it's fine. :)

lol. since i do it it is ok... :)

the purpose of a scripting language is to parse requests before they are sent back to the user. so, if you scripts parse and include headers and footers before they are sent back, it is seamless to the end user. as long as what they get back is put together, i don't think it matters how this is accomplished.