Skip to main content
Tweeted twitter.com/#!/StackCodeReview/status/436812731057192960
added 14 characters in body; edited tags; edited title
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

Review Structurestructure of PHP/HTML

I am very new to PHP, and I kind of sort of want to create the pages like I would in ASP.NET,NET; it's just the way I am wired. I have been inserting the header/menu using a PHP Include and here is what the code looks like for just the first page.

amAm I doing this properly, or is there a better way?

index.php

index.php

Menu.php

Menu.php

If you would like to see the front page it is, http://sturgishellfighters.hartwebpages.comclick here.

This page will be changing as I am currently working on it.

This page will be changing as I am currently working on it.

Review Structure of PHP/HTML

I am very new to PHP, I kind of sort of want to create the pages like I would in ASP.NET, it's just the way I am wired. I have been inserting the header/menu using a PHP Include and here is what the code looks like for just the first page.

am I doing this properly, or is there a better way?

index.php

Menu.php

If you would like to see the front page it is http://sturgishellfighters.hartwebpages.com

This page will be changing as I am currently working on it.

Review structure of PHP/HTML

I am very new to PHP and I kind of sort of want to create the pages like I would in ASP.NET; it's just the way I am wired. I have been inserting the header/menu using a PHP Include and here is what the code looks like for just the first page.

Am I doing this properly, or is there a better way?

index.php

Menu.php

If you would like to see the front page, click here.

This page will be changing as I am currently working on it.

Source Link
Malachi
  • 29.1k
  • 11
  • 87
  • 188

Review Structure of PHP/HTML

I am very new to PHP, I kind of sort of want to create the pages like I would in ASP.NET, it's just the way I am wired. I have been inserting the header/menu using a PHP Include and here is what the code looks like for just the first page.

am I doing this properly, or is there a better way?

index.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>New Jerusalem</title>
    <link rel="stylesheet" type="text/css" href="Main.css"/>
  </head>
  <body>
    <div id="wrapper">
      <div id="header">
        <?php include ('Menu.php') ?>
      </div>
    <div id="content">
      <h1 class="PageTitle" >Sturgis Hellfighters</h1>
        <div class="indexright" width="50%">
          <h3 class="smallheader">Scripture Corner</h3>
          <p><img src="images/Romans5-8.jpg" width="475" alt="Romans 5:8" /></p>
          <p></p>

        </div>
        <div class="indexleft" width="50%">
          <p><img src="images/BridalFallsSpearfishCanyon.jpg" width="475" height="720" alt="Bridal Falls Spearfish Canyon" />
          </p>
        </div>
      </div>
    </div>
  </body>
</html>

Menu.php

<img src="images/SiteHeader.jpg" width="1000" height="150" alt="HellFighters New Jerusalem" id="siteheader"/>
<ul id="HomeMenu">
    <li class="TopLevel"><a href="index.php">Home</a></li>
    <li class="TopLevel"><a href="#">News</a>
        <ul>
            <li class="SecondLevel"><a href="#">Sturgis Current Events</a></li>
            <li class="SecondLevel"><a href="#">Rapid City Events</a></li>
            <li class="SecondLevel"><a href="#">Pierre Events</a></li>
            <li class="SecondLevel"><a href="#">Other Events</a></li>
        </ul>
    </li>
    <li class="TopLevel"><a href="#">Photos</a>
        <ul>
            <li class="SecondLevel"><a href="christmasatpineridge.php">Christmas On Pine Ridge</a></li>
            <li class="SecondLevel"><a href="XmasMission.php">Christmas At the Mission</a></li>
            <li class="SecondLevel"><a href="OpenHouse.php">Open House</a></li>
            <li class="SecondLevel"><a href="Nationals.php">Nationals</a>
        </ul>

    </li>
    <li class="TopLevel"><a href="#">Events</a>
        <ul> <!--  -->
            <li class="SecondLevel"><a href="#">A Pine Ridge Christmas</a>
            <li class="SecondLevel"><a href="#">A Sturgis HellFighter Christmas</a>
            <li class="SecondLevel"><a href="#">Sturgis Motorcycle Rally</a></li>
            <li class="SecondLevel"><a href="#">Random City Swap Meet</a></li>
            <li class="SecondLevel"><a href="#">Cool Event</a></li>
        </ul>   
    </li>
    <li class="TopLevel"><a href="#">Contact Info</a>
        <ul>
            <li class="SecondLevel"><a href="#">President</a></li>
            <li class="SecondLevel"><a href="#">Vice-President</a></li>
            <li class="SecondLevel"><a href="#">Preacher Man</a></li>
        </ul>
    </li>    
</ul>

I would like to use HTML5 if possible, so if your review brings up HTML5 that is cool with me too.


If you would like to see the front page it is http://sturgishellfighters.hartwebpages.com

This page will be changing as I am currently working on it.