[PHP-DB] database-to-site structure advice? From: andrew (andrew <email protected>)
Date: 12/16/00

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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>