1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do you make a simple content change with php script?

Discussion in 'Cloaking and Content Generators' started by globexweb, Apr 4, 2013.

  1. globexweb

    globexweb Newbie

    Joined:
    Mar 29, 2013
    Messages:
    11
    Likes Received:
    0
    Hi All;

    I'm knew to php. But the only way to learn it is to try, right? So i'm trying to make a simple 5 page web site. I want to use one layout and I want to be able to switch content of the page by clicking a link and using php. If you know how to do this simple script please show me in detail. Thank you.

    Regards
    Globexweb
     
  2. plut0

    plut0 Regular Member

    Joined:
    Aug 2, 2008
    Messages:
    261
    Likes Received:
    59
    Have you try mvc approach. Better use existing php framework to separate template with core code. You could have better code flow using Model View Controller.
     
  3. user999

    user999 Newbie

    Joined:
    Aug 28, 2011
    Messages:
    3
    Likes Received:
    0
    Location:
    Canada
    just create a parameter in the link to the content from your site something like
    pagecontent=(number)
    then use file_get_contents to insert the content from a resource on the server into the template wherever its supposed to go !