Results 1 to 4 of 4

Thread: Use PHP to change part of my pages

  1. #1
    Join Date
    Aug 2009
    Posts
    54

    Use PHP to change part of my pages

    I created a new website for my school, which compasses of a fortnight to see a little more of the page.

    Its structure is currently only in xhtml / css with a little flash and js sometimes, but not PHP(although some pages contain forms so there will be some PHP).

    To grossly describe the appearance of my site, all pages are created on the same basis, ie:
    -invariant elements of (the top banner, left menu, below the SIDS page
    then right-menu, which depend on the content of the page.

    This is quite simple and feasible in HTML alone, but I told myself, as only the "center of my page will change, why not do all the rest in PHP?

    My goal: if I make changes to my menu or my banner, it will save me having to edit each of my pages. By not changing my php, hop, that change the samething on 15 other pages.

    Do you think this is wise? If yes, how is that possible knowing that my site is in the form of a table and therefore only one cell in this table is the part that will vary, and all the rest will not change? In addition, the first page being already made, with all the css formatting is consistent so that I transform into php?

    I wonder if it is not easy to make my body page (the invariable on all content pages menu and banners) in HTML, php and use of only my core for the page (part variable) using <? php include ( 'mypage.html');?>??

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Use PHP to change part of my pages

    Yes it is possible, even the first use of php and your last part is the correct solution for your problem. You can make a Ajax navigation which replaces the variable part of the site with effect fadein/fadeout (jquery) its sympa.

  3. #3
    Join Date
    Aug 2009
    Posts
    54

    Re: Use PHP to change part of my pages

    Ok, thank you! Therefore I see that I still have a concern:

    So I have my php page that contains my entire body invariable (menu, banners and others), and my box that contains the variable portion.

    Let my invariable part base.php. Say this base.php owns a painting and I want to see my variable (which can be page1.html, page2.html, page3.html ... following on what I clicked on my menu) appear in a box of this table (for example here: <td> here <td>)

    How do I do?

    Assuming that I have in my menu

    HTML Code:
    <a href="base.php?page=page1">Putting the page1</a>
    So in my base.php between tags <td> what I have seen my writing include will depend on what I chose in the menu (page1, 2, or 3.html)?

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Use PHP to change part of my pages

    I do not know if that's what you expect but avoid making layouts with tables.

    the variable part is in base.php
    PHP Code:
    <? 
    include ( '. / directoryOrRangeYourPages /.'$_ GET [' page].. 'html'); 
    ?>
    its not very secure but it works

Similar Threads

  1. Change the pattern of all the web pages in my website
    By Deepest BLUE in forum Software Development
    Replies: 4
    Last Post: 18-12-2009, 06:58 AM
  2. GTX 285 Part Numer
    By mikmax in forum Monitor & Video Cards
    Replies: 1
    Last Post: 23-11-2009, 01:42 PM
  3. Part time job
    By pradeep pk in forum Education Career and Job Discussions
    Replies: 5
    Last Post: 22-07-2009, 02:42 PM
  4. How do i add pages to existing pages in iweb
    By Samsher in forum Software Development
    Replies: 3
    Last Post: 04-05-2009, 10:18 AM
  5. How to Extract abc.part.001 abc.part.002 files
    By Jinendra in forum Windows Software
    Replies: 3
    Last Post: 05-03-2009, 11:43 AM

Tags for this Thread

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
  •  
Page generated in 1,714,166,863.84246 seconds with 17 queries