Hopefully I can make myself clear here on what I'm trying to do
I'm looking for a way to have a single insert script thgat inserts records into a mySQL DB, with the ability to insert into different tables - one file inserts all, was what I was hoping
So, instead of having many different files that insert records into different ables with different attributes and values, I;m trying to find a way to have ONE insert file, that can handle different insert requests to different tables, just basically to save time and cut back on the number of files in a directory. For the site I;m doing, I have a lot of functionality, mainly with insert queries (e.g - add assignment, add student, add staff, etc etc)
It would just make sense to have one file that could insert into m,any different tables depending on the varibales sent from a previous form.
For exmaple, instead of INSERT INTO tblStudent, a script may read INSERT INTO $table; $table being a value sent from a previous form, like "student".
Hopefully this all makes sense; I just can't work out how to do this, nor do I even know if this is possible!
Haver tried posting this question on other forums, but either people get generally puzzled or I don't understand their solution!
Any suggestions would be much appreciated!
I'm looking for a way to have a single insert script thgat inserts records into a mySQL DB, with the ability to insert into different tables - one file inserts all, was what I was hoping
So, instead of having many different files that insert records into different ables with different attributes and values, I;m trying to find a way to have ONE insert file, that can handle different insert requests to different tables, just basically to save time and cut back on the number of files in a directory. For the site I;m doing, I have a lot of functionality, mainly with insert queries (e.g - add assignment, add student, add staff, etc etc)
It would just make sense to have one file that could insert into m,any different tables depending on the varibales sent from a previous form.
For exmaple, instead of INSERT INTO tblStudent, a script may read INSERT INTO $table; $table being a value sent from a previous form, like "student".
Hopefully this all makes sense; I just can't work out how to do this, nor do I even know if this is possible!
Haver tried posting this question on other forums, but either people get generally puzzled or I don't understand their solution!
Any suggestions would be much appreciated!