#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Dallas
    Posts
    2
    Rep Power
    0
    Ok, i am new to php and stuff like that, but what i want to do is create something so that say i have a non frames site, but i have alot of sections and i dont want to go through every page and add a section every time i make a new section, i want to do a thing so that i can add the page onto one thing, and it automaticly appears on all the other pages instead of going through every page. So im looking for a thing where it would make it easier to edit my menu so that it isnt such a pain in the ***. if you can help me out please do.
    peace out
    mike
  2. #2
  3. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    you're probably going to want to use the include() function, or even more drastic, the auto_(pre|ap)pend_file directive in php.ini
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Dallas
    Posts
    2
    Rep Power
    0
    Yeah i had the include thing in there, but for some reason it wasnt working, and this is the very first time i have tried to learn this bc i have always worked with frame sites, well if you have n e info on wut i should do please by all means reply again.
    peace out
    mike
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Quispamsis, NB, Canada
    Posts
    49
    Rep Power
    14
    I am also new to php, but if you make the header so it cuts off right before the content of the page content and the footer right after it'll work. For example:
    <?
    include("header.php");
    ?>
    Your page stuff here.
    <?
    include("footer.php");
    ?>

    OR you can do something like this, where your pages change with the query string, and whatever the query string is, that is the file it looks for....if the query string is "download" it will look for "download.inc" to include, and if the query string is blank it will display the index page.
    <?
    if ($QUERY_STRING == "")
    {
    include("header.inc");
    include("index.inc");
    include("footer.inc");
    }
    else
    {
    include("header.inc");
    include($QUERY_STRING.".inc");
    include("footer.inc");
    }
    ?>


    Hope This Helps,
    Scott

Similar Threads

  1. Replies: 3
    Last Post: February 13th, 2004, 02:12 PM
  2. Confused about mod_ssl, HELP!
    By osensei in forum Apache Development
    Replies: 0
    Last Post: January 26th, 2004, 08:52 AM
  3. I am new to server side languages and am a little confused.
    By dynasty in forum ColdFusion Development
    Replies: 4
    Last Post: January 15th, 2004, 09:42 AM
  4. fgets() makes me confused!
    By Greentree in forum C Programming
    Replies: 2
    Last Post: December 23rd, 2003, 09:11 PM
  5. onClick thing..
    By banan2 in forum HTML Programming
    Replies: 4
    Last Post: December 1st, 2003, 04:35 PM

IMN logo majestic logo threadwatch logo seochat tools logo