Create Dynamic table

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
yooreen
Forum Newbie
Posts: 1
Joined: Tue Mar 11, 2008 11:51 pm

Create Dynamic table

Post by yooreen »

Hello there.
i'm urm, having trouble here. i need to create a code which will allow user to create table in database and then the user can insert data into that table.

example:

a user will create material table. e.g : Electrical. and in this so-called electrical table, there will be a few fields such as id, types, etc.

then, the user can view a page that will display all items in this electrical table.
pls somebody tell me how to do this :(
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Re: Create Dynamic table

Post by andym01480 »

http://www.tizag.com/mysqlTutorial/ is a good tutorial on php and mysql.

You'll need user privileges in mysql to create tables from a script - sounds pretty dangerous to me on a live site without user authentication!

Come back and post some code and ask a question if you are having trouble
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Create Dynamic table

Post by RobertGonzalez »

Can this be done differently? Users creating tables leads to a maintenance nightmare down the road.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: Create Dynamic table

Post by Zoxive »

You could just use phpmyadmin which already does all of which you want and more.

I would not recommend using this for clients though, unless they have computer smarts. :lol:
Post Reply