Hello Everyone,
I am trying to make a script that will move one row of information to another table within the same database.
I know I can use a:
INSERT INTO $tabletake SELECT * FROM $tablegive WHERE id = $id
But I would also like the user to be able to select which table the information goes into.
I was thinking about a javascript window that the user can select a radio button on which table to insert into, but I do not know how to take the information from the JS window and enter it back into the php code.
What is the best way to do this?
Here is my best illustration on how I am trying to structure it.
Root Folder:
|index (main script)
: |_functions/function (link inserted with a php include)
:__ Javascript window (the window is called from the main page but is coded in the include)
I have the variables grabbed from the php include function and passed to the index that includes the main script.
If this is to confusing let me know, Ill draw it out on a jpg and upload the picture, or if you know a better way to structure that would help. :-)
God Bless,