Ronald B Stamets Website Design and Development Corner of logo

Ronald B Stamets, Web Site Design and Development Services

top content bar
Home Website design Domains & Hosting E-Commerce Additional Services Contact Us About Us Web Design Tutorials FAQ Pay Bill Site Map Request Estimate

Writing The Footer Function

This will be the last code we will need for our output_fns.php file to dynamically display the design elements across your entire website.Once again, look at the code below and compare it with the code in your default.html file.

Did you notice that we completely skipped over the code for column 2 in row 2 and went directly to  row 3?

Explanation: Column 2 in Row 2 is reserved for the unique content you will be putting on the new pages you create.  Thus we only "call" the server to display the cells that will be needed globally for every page.

Notice also that we replaced the date with <?php echo date("Y"); ?>.  When the next year rolls around, your copyright notice will automatically update to the current year.  Think about having to manually change those dates on a few hundred pages!

COPY AND PASTE ALL OF THE CODE TO YOUR output_fns.php FILE, LEAVING A FEW EMPTY LINES BELOW THE LAST CODE YOU INSERTED. Then Close output_fns.php.

function display_html_footer()
{

?>
<!-- FOOTER -->
    <TR>
        <TD BGCOLOR="#006600" COLSPAN="2" ALIGN="center" VALIGN="top"><FONT COLOR="#FFFFCC">© <?php echo date("Y"); ?> MYSITE.COM</FONT><BR>
        </TD>
   </TR>
<!-- END OUR TABLE -->
</TABLE>
</BODY>
</HTML>

<?php
}

Previous Page Return To Main Index Next Page

:::Key Notes:::

IMPORTANT!

Every function needs the } to define it's end.  Double check all 3 functions that you copied and pasted to output_fns.php to be certain that they are all there!

Need Help?


:::Tidbits:::

In the real world, we generally create our initial default.html web design with a quality WYSIWYG editor, like Dream Weaver. (Why Not Front Page!)

Then, after the look is just right, we break it apart into functions like you just did with default.html.

home
 
Website Design
 
Domains Hosting
 
ECommerce
 
addl services
   
Contact Us
 
About Us
 
Tutorials
 
Design FAQ
 
Pay Bill
 
site map