Im still unsure of what to use (Static Pages, or dynamic pages)

Soldato
Joined
1 Dec 2004
Posts
23,081
Location
S.Wales
My previous web-design skills have only really been used creating static webpages in XHTML/CSS.

I do have some experience in PHP, but still unsure of weather to just use static webpages again or create dynamic pages with dynamic content using the $_GET PHP method.

What does everyone else do?

Do people usually just create a single PHP page and dynamically update the content or create multiple PHP pages?
 
Last edited:
It really depends what you want to do with the site. Do you have any plans which require dynamic content, e.g. anything which uses a database or allows users to log in? Or will it just be static information?
 
Basically what is a less pages as possible to manage, I will be creating features such as a login and database connection.

Iv created pages in PHP before but iv had this over multiple pages, I have heard of creating a single page and dynamically changing the content, again I dont know what the best way is to approach this, is this a reccomended way of doing it? or is it better to use PHP with an SQL database for dynamically updating the content.

I have trawled through google but its just chucking up a load of half hearted not very good tutorials.

Basically, I want:

Dynamic Webpages in PHP (Which Can be easily managed and updated) that will allow me to try out web technologies through programming launguages. And if possible a tutorial to get me started on creating a webpage which will allow me to dynamically update the content.

Any help greatly appriciated.

Thanks
 
If you want a login system then that will have to be done dynamically in a language like PHP.

It really depends what kind of site you're making. Things like blogs and galleries will store the posts, image data, etc. in an SQL database and fetch them using PHP. In that case, though, you might as well set up a blogging system like Wordpress. Unless you're just doing it for the experience, writing a system like that is reinventing the wheel - there's loads of well-supported ones already.
 
If you want a login system then that will have to be done dynamically in a language like PHP.

It really depends what kind of site you're making. Things like blogs and galleries will store the posts, image data, etc. in an SQL database and fetch them using PHP. In that case, though, you might as well set up a blogging system like Wordpress. Unless you're just doing it for the experience, writing a system like that is reinventing the wheel - there's loads of well-supported ones already.

Yeah im aware of this as this is something I have implemented before but this is not the main reason for the post. The reason for the post is to find out the best way to structure your pages and content and make them dynamically navigational and easy to updating using PHP.

e.g. Do I have seperate .php files each holding their own content?

index1.php
index2.php
index3.php

or do i have a single .php file that holds all the content, then call it up using a $_GET method?


also i read a way of calling the content up from an SQL database?

also read about just having a single php file

"index.php"

which links up to a css file, holds the structure, then you can call .php files which only contain the text content.

There are so many ways of doing it i dont know which way will be the best?
 
Last edited:
I for example, an currently doing a uni project

It's a golf website, that among other things, has

RSS feeds
Logins
MYSQL databasey stuff
PHP based social network (very basic, I'm writing it myself)
etc etc

I have one php file called index.php


Then in that file, it has

Require_once the header, the div's, the footer

Theres a php include that looks for the content required for THAT page and pulls it out and displays it

etc etc


to simplfy it,

someone on here had an index.php page, in it had a php function that required a few .txt files, these .txt files had all the data , i.e welcome to the site, here is our service etc etc

Not the safest way to do it, but can you understand the premise?

Any help?
 
Have you looked at Joomla? I know you want to do it yourself but it gives you a good example of what your trying to achieve. I've recently started desinging a website and wanted dynamic pages but know little of php so have been giving it ago. It uses a single index.php page connected to a mysql database styled with CSS and changes the parts you tell it to as you navigate pages.

Just a thought, and might help you reverse engineer what your trying to do.
 
I for example, an currently doing a uni project

It's a golf website, that among other things, has

RSS feeds
Logins
MYSQL databasey stuff
PHP based social network (very basic, I'm writing it myself)
etc etc

I have one php file called index.php


Then in that file, it has

Require_once the header, the div's, the footer

Theres a php include that looks for the content required for THAT page and pulls it out and displays it

etc etc


to simplfy it,

someone on here had an index.php page, in it had a php function that required a few .txt files, these .txt files had all the data , i.e welcome to the site, here is our service etc etc

Not the safest way to do it, but can you understand the premise?

Any help?

This is what I think im going to do, basically ill start with the basics and have a defined page, lets say

index.php

on here will be a simple css layout (Banner, nav, body, footer)

now.... lets say for instance i click "links" from the nav div, id want it to use the $_GET method to grab the content from another file.

This way, i can manage several files which contain only content for the site.

There is more stuff i want to do but its just getting the ball rolling again :)
 
As someone mentioned, I would try joomla or (my preferred) drupal. Either can do login with various user rights management stuff, blogs, forums, books, etc. And no scripting required. Creating stuff like login and everything takes quite a while if you are going to write it all yourself...(or so I've been told)
 
Back
Top Bottom