Jump to content

how to change one page to change all?


amityville12

Recommended Posts

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

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 :-)

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');
?>

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

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.