Jump to content

dynamically calling multiple tables for admin


beermaker74

Recommended Posts

ok forgive me if my question is a bit convoluted. I am using php 4.4.4 and mysql 4.01. To start off with I want a user to register. the results will go into table users. now after the user registers I would like  another table to be created dynamically and the table name would then be inserted into table users to correspond to whatever user just registered. I am assuming I can just write a sql statement with the  variable name to create the new table. After this is accomplished I need to display that table every time a user logs in. I also need the user to be able to edit, delete and add new records to this table from this page. So what is the best way to call up this table when the user logs in? Should I use a session variable? I have no problem creating pages that edit, delete and add records to a database  if there is only one main table. I need a dynamic admin page. is there some master variable that I can pass to edit delete and add records to the db? there are many more things that I am trying to do here but this is my main prob. I can create a reg page, login page, table listing page, edit page, and add record page if there is only one main table to display. I am just unsure how to do this with multiple tables. Thanks for the help
Creating a table for every user would be a bad idea IMHO. A better approach would be to create a UserData table for all users data. You just need to include a column for the userID and you would use that to determine what data to display to the user.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.