webmaster Posted June 17, 2009 Report Share Posted June 17, 2009 I've seen some websites that have one page, example page.php with a ?sectionid=number so it looks like this: www.example.com/page.php?sectionid=1. Each new page is still page.php, just with a new sectionid. How/why do the developers use this technique instead of different pages? Link to comment Share on other sites More sharing options...
smerny Posted June 17, 2009 Report Share Posted June 17, 2009 (edited) if ($_GET['sectionid'] == 1){ [something]}if ($_GET['sectionid'] == 2){ [something else]} Edited June 17, 2009 by smerny Link to comment Share on other sites More sharing options...
justsomeguy Posted June 17, 2009 Report Share Posted June 17, 2009 If the pages are the same, but only the content changes, it's easier to maintain a single page that swaps out the content instead of one page per piece of content. Link to comment Share on other sites More sharing options...
Synook Posted June 17, 2009 Report Share Posted June 17, 2009 And when a new piece of content is created (e.g. a new blog post) you don't have to manually create a new page, you can just use the querystring to figure out which bit to pull from the DB. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now