SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: need help!!

  1. #1
    SitePoint Addict
    Join Date
    Apr 2003
    Location
    canada
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy need help!!

    i have a file that i'm trying to include into my main document. But I'm getting the following error
    Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in c:\program files\apache group\apache\htdocs\harbour\header.php on line 6
    PHP Code:
    <?
    print("
    <BODY BGCOLOR=#FFFFFF LEFTMARGIN=\"0\" TOPMARGIN=\"0\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\">
    <div align=\"left\"><IMG SRC=\"images\header.gif\" WIDTH=\"770\" HEIGHT=\"112\" ALT=""> </div>
    </BODY>
    "
    );
    ?>
    here is the header.php file can anyone spot the mistake I've been trying to figure this out for a few hours now

    Thanks

  2. #2
    With More ! for your $ maxor's Avatar
    Join Date
    Feb 2004
    Location
    Scottsdale, Arizona
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just do this

    HTML Code:
    <!-- header.php -->
    <BODY BGCOLOR=#FFFFFF LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"> 
    <div align="left"><IMG SRC="imagesheader.gif" WIDTH="770" HEIGHT="112" ALT=""> </div> 
    </BODY>
    PHP Code:
    //-- index.php
    <?php

    include_once('header.php');

    ?>

  3. #3
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    4 ways to include files:
    include()
    require()
    include_once()
    require_once()

    Also, just a little advice. If you plan to have many lines of code to display, you might want to exit PHP to write your HTML code or use the heredoc syntax.

  4. #4
    SitePoint Member
    Join Date
    May 2004
    Location
    earth
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy update thing

    ok well i want to make a form that send the information to a database then the information to be like a news update , i dont want any to be deleted jus added to anyone help me

  5. #5
    SitePoint Member
    Join Date
    May 2004
    Location
    earth
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i need help im a real n00bie

  6. #6
    With More ! for your $ maxor's Avatar
    Join Date
    Feb 2004
    Location
    Scottsdale, Arizona
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wait. So is this a question about how to include a file or how to interact with a database?


Bookmarks

Posting Permissions

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