Hey guys/gals I have been a reader of this forum for a while now, I have read all the tutorials and I am still stuck I know there is a better way to do this but here is what I got so far. Keep in mind I'm pretty new to php. Anyhow here goes... Let's assume your trying to create a large site with a lot of content such as flash movies, stories ect..

Create your main page layout and then insert this coding where you'd like your main content to go.

if (file_exists("$page.html")) {
} else {
// Page doesn't exist, so lets include the 404 error page or whatnot

So that starts your site off. For any additional pages you just create the text to be entered on an html file for example "contactinfo.html" and then point the link towards it.

Example http://www.yoursite.com/index.php?page=contactinfo


Now for the content part since most pages that host the movies/stories would be the same layout you could try this. You would first need to create the main template and leave room for fields like author, movie, size ect... now for this example call the page template.php.

Now in this template you would layout everything the way you wanted it to look but then in the places you would want lets say the "author field" to show up you'd use $auth and then the file size you'd use $filesize ect...

So you template file might look like this.

This movie was submitted by $auth and is $filesize MB.


Now you need to have those fields filled in so you add this coding into the template file

if (file_exists("$content.txt")) {
} else {
// Page doesn't exist, so lets include the 404 error page or whatnot

and then create the link, to lets say http://www.yuoursite.com/template.php?content=1

Now in the content 1.txt file all you would have are the required fields such as

<? $auth ="John"; ?>
<? $filesize =5; ?>

ect.... So when every you wanted to update your site with new content you would just have to enter a few fields and then upload the file, create the link and your done.

This is what I got done so far, I know I could make it alot better for example I think the "content.txt" files should be replaced with some sort of sql db so if you need to add more fields it would be easier. But I haven't found out how to do this yet with php. I know it's not too hard but I just haven't found out yet. I know there are a ton of professional php programmers that browse this board so if any of you would like to comment and possibly point me in the right direction that would be appreciated alot.

A friend told me that by using a db I could also use php to make the main page of the site automated by it showing the last 5 entries to the db. So sections could be automated. I could also divide and display them into different categories?

Anyone have some ideas to share on how I can make this little system better?