database-to-site structure advice?

From: Date: Sun, 17 Dec 2000 04:01:26 +0000
Subject: database-to-site structure advice?
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-general+get-30704@lists.php.net to get a copy of this message
Hi Gurus, wonder if someone can suggest an approach here: I have put content into a MySQL table, basically with a row per page, eg: row field : example field data ---------- ---------------------------------------------------------- pagename : (page.php) title : (welcome to this page header text) textblurb : (this page is about bla bla bla and you care because...) picture : (img src ="/path/to/filesystem/img.jpg") link : (a href="link/to/related/page2.php") I want to have my main index.php page get a list of pages in the database, and present them as navigation items (doesn't seem too hard, via looping a select and echo). It also seems pretty straigforward to create a new page through a "select variables into array where pagename = page.php" statement that populates an array of variables that are used to build a new page via a template. The thing I cannot wrap my head around is how do I jump from the index.php to page.php, e.g. page.php can contain a template, that is just looking for said array, but I'm not sure how to pass that across or call the specific page.php variables and the template...? Any (breif) example would be greatly appreciated, or a pointer to some existing code that is doing this. This must be a fairly standard way of creating pages dynamically - anyone? As you can prob. tell, I'm good at databases and html, but not sure how to essentially make 'relational pages' that don't can persist as tables instead of filesystem pages. Thanks in advance! regards, andrew ------ End of Forwarded Message

« previous php.general (#30704) next »