Help - Search - Members - Calendar
Full Version: Loading a page in PHP
HTMLHelp Forums > Web Authoring > General Web Design
DenimDonnie
My name is Donnie, and I do some basic web programming, but mainly SQL. I've started venturing into some web design and building, and have run across some problems.

So here's my scenerio. I work for the County doing primarily IT work, and so they asked me to design a new site and so I did. We'll I thought, HTML is great, but I'd really like to convert the pages into php, NOT to build it in php, but to use scripts if I had to. The second great thing that it allowed me to do, was create a VERY simple template system, so that, they wouldn't have to edit every page, to update links.

Well I've got the site lookin good in Internet explorer and FireFox: index page (no scripts)

But I want to retrieve certain portions of the site, instead of them being on every page (aka make a nav.php file, and pull it every time on every page. Instead of manually updating links, I alter 1 file, and its done nav.php).

So I did this: Index page (pulling menu script)
Once again, it looks great in Internet Explorer, but in firefox, it seems to have pushed the main.jpg down to the next row (below the menu). However I didn't add any new rows or columns.

The menu itself (nav.php) is a table within a table. So I cut ONLY that table out, and made its own file, nav.php.

Here's my codes:

Full Table code of nav.php
CODE
<table width="157" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#A3A3A3"  bgcolor="#143651" id="side_nav_bg">
                      <tr>
                    <td width="10"><div align="right"><img src="images/arrow.gif" width="9" height="10" /></div></td>
                       <td width="147"><a href="index.html">Home</a></td>
                      </tr>
                      <tr>
                        <td colspan="2"><div align="center"><img src="images/navspacer.gif" width="147" height="2" /></div></td>
                        </tr>
                      <tr>
                    <td width="10"><div align="right"><img src="images/arrow.gif" width="9" height="10" /></div></td>
                       <td width="147"><a href="index.html">Agenda & Minutes</a></td>
                      </tr>
                      <tr>
                        <td colspan="2"><div align="center"><img src="images/navspacer.gif" width="147" height="2" /></div></td>
                        </tr>
                      <tr>
                    <td width="10"><div align="right"><img src="images/arrow.gif" width="9" height="10" /></div></td>
                       <td width="147"><a href="index.html">Calendar & Events</a></td>
                      </tr>
                      <tr>
                        <td colspan="2"><div align="center"><img src="images/navspacer.gif" width="147" height="2" /></div></td>
                        </tr>
                      <tr>
                    <td width="10"><div align="right"><img src="images/arrow.gif" width="9" height="10" /></div></td>
                       <td width="147"><a href="index.html">County Committies</a></td>
                      </tr>
                      <tr>
                        <td colspan="2"><div align="center"><img src="images/navspacer.gif" width="147" height="2" /></div></td>
                        </tr>
                      <tr>
                    <td width="10"><div align="right"><img src="images/arrow.gif" width="9" height="10" /></div></td>
                       <td width="147"><a href="index.html">County Maps</a></td>
                      </tr>
                      <tr>
                        <td colspan="2"><div align="center"><img src="images/navspacer.gif" width="147" height="2" /></div></td>
                        </tr>
                          <tr>
                        <td width="10"><div align="right"><img src="images/arrow.gif" width="9" height="10" /></div></td>
                        <td width="147"><a href="index.html">County Offices</a></td>
                  </tr>
                          <tr>
                        <td colspan="2"><div align="center"><img src="images/navspacer.gif" width="147" height="2" /></div></td>
                        </tr>
                          <tr>
                    <td width="10"><div align="right"><img src="images/arrow.gif" width="9" height="10" /></div></td>
                       <td width="147"><a href="index.html">Notices</a></td>
                  </tr>
                            <tr>
                        <td colspan="2"><div align="center"><img src="images/navspacer.gif" width="147" height="2" /></div></td>
                        </tr>
                     <tr>
                    <td width="10"><div align="right"><img src="images/arrow.gif" width="9" height="10" /></div></td>
                       <td width="147"><a href="index.html">RFPs & RFQs</a></td>
                      </tr>
                            <tr>
                        <td colspan="2"><div align="center"><img src="images/navspacer.gif" width="147" height="2" /></div></td>
                        </tr>
                            <tr>
                    <td width="10"><div align="right"><img src="images/arrow.gif" width="9" height="10" /></div></td>
                       <td width="147"><a href="index.html">Contact Us</a></td>
                  </tr>
                            <tr>
                        <td colspan="2"><div align="center"><img src="images/navspacer.gif" width="147" height="2" /></div></td>
                        </tr>
                    </table>


test.php retrieve code:
CODE
<?php
include_once('template/nav.php');
?>




Once again it works great in IE, just FireFox, seems to be reading into the code too much and splitting it down to the next row.

Any assistance or guidance, or other suggestions would be great!
Christian J
In my Firefox it's http://www.co.okeechobee.fl.us/TEST/php/test.php that looks correct. unsure.gif

On http://www.co.okeechobee.fl.us/TEST/php/test.php the following shows up around line 33 (where it's not supposed to be):

CODE
<link href="../bocc.css" rel="stylesheet" type="text/css" />

while in the other version it's not present (my guess is it can be found in the included file). Don't know if that's what causes the pushing, though. The validator shows a number of errors on both page versions that you should correct.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.