Dynamic pages need to be generated dynamically

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rfigley
Forum Commoner
Posts: 70
Joined: Sun Apr 21, 2002 7:10 pm

Dynamic pages need to be generated dynamically

Post by rfigley »

I have this site, here is a sample page:
http://www.npiflorida.com/broward_chapter_list.php

Currently all pages for teh list of chapters have their own php page. Since the locations currenly linked to the list of members for that location. Locations need to be added dynamically to the database and the pages coming from that instead of having and individual php page for each one. Would it be best to have a single template that connects to the database for teh location called or should I have the template actaully in the database?
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

your description is a little wierd but i think i understood want you wanted. i think it might be best to have one template page and then pass that page a paramater that would then be used to pull up the information on each chapter.

note: in your chapter pages you have a ton of $nbsp 's floating around. they should be like this: &nbsp; <- with ending semi-colon.
sinewave
Forum Commoner
Posts: 41
Joined: Tue Sep 10, 2002 4:35 pm
Location: Canada

Post by sinewave »

What do your tables look like?
You could likely make it much easier than the way you have done it.
if each has a unique id i think using GET and a template would work much smoother for you.
rfigley
Forum Commoner
Posts: 70
Joined: Sun Apr 21, 2002 7:10 pm

Post by rfigley »

Yes your probably correct. This has been my first dynamic site and has been a learning process.

This is the table for the chapter data:

chapter_ID int(5) UNSIGNED ZEROFILL No auto_increment
county varchar(30) No
chapter_name varchar(40) No
lunch_breakfast varchar(15) No
location varchar(80) No
time varchar(20) No
day varchar(12) No
director varchar(40) No
members_link varchar(30) No
president varchar(30) No
president_number varchar(20) No

And this is for the members:

members_ID int(5) UNSIGNED ZEROFILL No auto_increment Change Drop Primary Index Unique Fulltext
name varchar(40) No Change Drop Primary Index Unique Fulltext
chapter varchar(30) No Change Drop Primary Index Unique Fulltext
position varchar(20) No Change Drop Primary Index Unique Fulltext
category varchar(50) No Change Drop Primary Index Unique Fulltext
business_name varchar(40) No Change Drop Primary Index Unique Fulltext
address1 varchar(40) No Change Drop Primary Index Unique Fulltext
address2 varchar(40) No Change Drop Primary Index Unique Fulltext
city varchar(20) No Change Drop Primary Index Unique Fulltext
state char(2) No Change Drop Primary Index Unique Fulltext
zip varchar(5) No Change Drop Primary Index Unique Fulltext
phone varchar(12) No Change Drop Primary Index Unique Fulltext
ext varchar(7) No Change Drop Primary Index Unique Fulltext
cell_phone varchar(12) No Change Drop Primary Index Unique Fulltext
fax varchar(12) No Change Drop Primary Index Unique Fulltext
email varchar(40) No Change Drop Primary Index Unique Fulltext
web_address varchar(40) No Change Drop Primary Index Unique Fulltext
member_since varchar(5) No
Post Reply