Results 1 to 4 of 4

Thread: PHP Layout Templet

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2001
    Location
    Los Angeles, Ca
    Posts
    33

    Lightbulb PHP Layout Templet

    I have a web page that has 3 files named header.php, footer.php, and index.php.. Header has the top logo and the side navigation. Footer has the bottom of the website, and index has the content. How do I put whatever I want into the index.php? Here is the coding I have for index.php

    Code:
    <html>
    <head>
    <title>blahblahtitle>
    </head>
    
    <body bgcolor="#000000">
    <? 
    include 'header.php'; 
    
    
    echo "i want the content to go here"; 
          
    include 'footer.php'; 
    ?> 
    
    </body>
    </html>
    -SuReKiLL
    http://surekill.net

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Why don't you put the beginning HTML tags in the header.php as well, and do this?:

    Code:
    <?php include 'header.php'; ?>
    
    <b>Content here</b>
    
    <?php include 'footer.php'; ?>
    Or if you want to keep those tags out of the header.php file, just do:

    Code:
    <html>
    <head>
    <title>blahblahtitle>
    </head>
    
    <body bgcolor="#000000">
    <?php include 'header.php'; ?>
    
    <b>Content Here</b>
          
    <?php include 'footer.php'; ?> 
    
    </body>
    </html>
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2001
    Location
    Los Angeles, Ca
    Posts
    33
    Here is what I have: http://www.surekill.net/testsite/SKn...psiteindex.php

    The header consists of the top thing with the text, the grey stripe under that, and the gray box to the left. The footer is that bottom stripe, and the index is the black box in the center. I set it up from the tutorial here: http://www.phpfreaks.com/tutorials/8/0.php
    -SuReKiLL
    http://surekill.net

  4. #4

    Thread Starter
    Member
    Join Date
    Dec 2001
    Location
    Los Angeles, Ca
    Posts
    33
    cool it worked great. thx for the help
    -SuReKiLL
    http://surekill.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width