amityville12 Posted April 5, 2007 Share Posted April 5, 2007 i need to know how to create a page where i only have to change one thing on one page so it changes that text or image on every page of my site. in other words i want to be able to create a template, so if i do want to vchange something in the duture, i only have to change on page, instead of changing each individual page. Link to comment https://forums.phpfreaks.com/topic/45809-how-to-change-one-page-to-change-all/ Share on other sites More sharing options...
Caesar Posted April 5, 2007 Share Posted April 5, 2007 Sounds good. Then I suggest you run through some basic PHP/MySQL tutorials. With some minimal knowledge, you should be able to create a small CMS. If you do not wish to invest the time into learning, there are quite a few template based systems already out there. Good luck :-) Link to comment https://forums.phpfreaks.com/topic/45809-how-to-change-one-page-to-change-all/#findComment-222557 Share on other sites More sharing options...
per1os Posted April 5, 2007 Share Posted April 5, 2007 Most likely want to create headers and footers that way you can always do the headers. IE: <?php //header.php print '<head><title>My Title</title></head>'; ?> <?php //footer.php print 'My Footer </body></html>'; ?> <?php // body.php include('header.php'); print '<body>My Body!!!<br /><br />'; include('footer.php'); ?> Link to comment https://forums.phpfreaks.com/topic/45809-how-to-change-one-page-to-change-all/#findComment-222560 Share on other sites More sharing options...
shizzledizzizzle Posted April 5, 2007 Share Posted April 5, 2007 http://www.php.net/function.include This is pretty much all you need to do that. Link to comment https://forums.phpfreaks.com/topic/45809-how-to-change-one-page-to-change-all/#findComment-222561 Share on other sites More sharing options...
PC Nerd Posted April 5, 2007 Share Posted April 5, 2007 yeah, i recomend you use include files, or databases ( however, id use include files) i use them al over the place if theres a database link, thats got an inclue, as do creat cookies for a login, retreiving user data etc. if theres something the same on every page, such as a menu, then i put it in an include file, and that way i only have to type it once, then include the file its much easier Link to comment https://forums.phpfreaks.com/topic/45809-how-to-change-one-page-to-change-all/#findComment-222564 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.