webmaster Posted June 17, 2009 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 Share Posted June 17, 2009 if ($_GET['sectionid'] == 1){ [something]}if ($_GET['sectionid'] == 2){ [something else]} Link to comment Share on other sites More sharing options...
justsomeguy Posted June 17, 2009 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 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
Archived
This topic is now archived and is closed to further replies.