Announcement

Collapse
No announcement yet.

need help with php include

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • need help with php include

    I'm trying to use the php include for my header, etc on a new site and I'm getting this error message....

    Fatal error: Cannot redeclare header() in /home/pnyejnk/public_html/lowcarbjourney/header.php on line 31


    What am I doing wrong?
    the site is www.lowcarbjourney.com and I'm just getting it started. There's not much there yet so I was going to do the php includes for the header, menu bar, left bar and right bar.

    I thought I followed the instructions by the letter, but obviously not......

    The header is saved on page "header.php"
    I'm trying it on a page named "myths.php"

    (Sorry.......I posted this in the Tips and Tricks forum by accident already and then realized it didn't belong there. Can someone delete that post since it was in the wrong forum?)
    Designer Fragrances | Aromatherapy | Candles
    Outdoor Garden Furniture and Garden Decor

  • #2
    Re: need help with php include

    Will you post lines like 28-35

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

    Comment


    • #3
      Re: need help with php include

      Not sure how to do that...
      I did a view source on the published header page and it just shows the same error message as I posted above.
      Designer Fragrances | Aromatherapy | Candles
      Outdoor Garden Furniture and Garden Decor

      Comment


      • #4
        Re: need help with php include

        The actual php code isn't show in the source. Open the file and copy and paste the php code

        Register/Login Script
        Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

        Comment


        • #5
          Re: need help with php include

          Okay.......pasting in the whole code from the page html on the header.php page. The blue text is the php code that was added per instructions from the tips/tricks forum.


          <? function header() { ?>

          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
          <HTML>
          <HEAD>
          <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
          <TITLE>Untitled Page</TITLE>
          <META name="GENERATOR" content="Created by BlueVoda">
          <STYLE type="text/css">
          div#container
          {
          width: 1025px;
          position: relative;
          margin-top: 0px;
          margin-left: auto;
          margin-right: auto;
          text-align: left;
          }
          body
          {
          text-align: center;
          margin: 0;
          }
          </STYLE>
          </HEAD>
          <BODY bgcolor="#FFFFFF" text="#000000">
          <DIV id="container">
          <IMG src="lcjheader3.jpg" alt="" align="top" border="0" width="895" height="105" style="position:absolute;left:0px;top:0px;width:89 5px;height:105px;z-index:0">
          </DIV>
          </BODY>
          </HTML>
          <?
          }
          ?>

          Designer Fragrances | Aromatherapy | Candles
          Outdoor Garden Furniture and Garden Decor

          Comment


          • #6
            Re: need help with php include

            Rename your "header.php" in "header1.php" or "myheader.php"or something like that. Change the code in the html box accordingly.

            Please have a look at your other thread. You have the same answer there.
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment


            • #7
              Re: need help with php include

              Yes! That did it! Thanks!!
              Designer Fragrances | Aromatherapy | Candles
              Outdoor Garden Furniture and Garden Decor

              Comment

              Working...
              X