PDA

View Full Version : php codeing


The_Net_Muppet
Sat 24th Feb '01, 12:31pm
Hope this does not sound too confusing, if anyone can help that wold be great:)


I need a php script to search *all* tables in the database, then for each table to list
all cat_id and category_title records, of each tables in its own pull down menu on screen.
Also by each tables pull down menu, to list the name of the table next to the drop down box.

structure:
==========



============
table1
============

"CREATE TABLE books_tbl (
cat_id int(10) DEFAULT '0' NOT NULL auto_increment,
category_title varchar(51),
PRIMARY KEY (cat_id)
)",



=============
table2
=============


"CREATE TABLE movies_tbl (
cat_id int(10) DEFAULT '0' NOT NULL auto_increment,
category_title varchar(51),
PRIMARY KEY (cat_id)
)",



For every table in the database categories To be displayed on a index.php page:

**pull down menu on page**
cat_id with category_title with data in it
NAME: books_tbl

**pull down menu on page**
cat_id with category_title with data in it
NAME: movies_tbl