Large web site

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ThinkGeekness
Forum Newbie
Posts: 16
Joined: Sat May 17, 2003 8:00 pm

Large web site

Post by ThinkGeekness »

I am going to create a news/reviews site, and I am going to have lots of pages. I want the idea to be like any major site (microsoft.com, techtv.com, athlonxp.com, etc.), where if you create a new page all of the other pages update their records to see it. I can use MySQL. I am having trouble explaining it... I am going to put it another way to see if it helps:

I want to have a site where all that I will have to do is add/edit the content to make a new page.. Where I dont have to add the layout and everything, or update the links on the pages. Where if I make one change to the layout, everything would get updated. Sort of like these forums, phpBB... Where there is one big file with all of the content in it relating to the topic.

Is there a good tutorial that explains this? Or can anybody help?
Does this make sense?

Thanks
Coco
Forum Contributor
Posts: 339
Joined: Sat Sep 07, 2002 5:28 am
Location: Leeds, UK
Contact:

Post by Coco »

what you want to do is have a header and footer which you include... meaning that most the template of the page is already set

see http://www.php.net/manual/en/function.include.php
ThinkGeekness
Forum Newbie
Posts: 16
Joined: Sat May 17, 2003 8:00 pm

Post by ThinkGeekness »

Thanks, I don't think that Include is exactly it. Here is an example:

I want to have a reviews page. If I want to add a review all I want to have to do is edit a file, say like review.php (I dont know exactly what it would be called). Then when I add that review, the new review shows up on a totally different page... Without having to create a new directory on the server.

Thanks
User avatar
zoki
Forum Newbie
Posts: 9
Joined: Tue Apr 23, 2002 3:09 pm
Location: Serbia
Contact:

Post by zoki »

You may have files, for example left.php, right.php, bottom.php. Then, from index.php, you can always include them.

It is always good to have a lot of smaller pages, than a big one. That way, it's easier to organise everything.

I also like to have for example prefs.php where I keep my vars. So I can define $bgcolor="#f0f0f0"; in my prefs.php and then on every page I can do:

Code: Select all

<?php
include "prefs.php";
echo "<body bgcolor='$bgcolor'>";
?>
You get the idea.
ThinkGeekness
Forum Newbie
Posts: 16
Joined: Sat May 17, 2003 8:00 pm

Post by ThinkGeekness »

Alright, thanks
Post Reply