Yeah well this is something very simple but i've been messing around all night long and i couldn't make a working script :eek:
Here is my situation: I made a page where my users are able to submit modification requests on the biography of a particuliar band. The modification requests are stored in a table called "BANDS2" while the official biographys are in "NEWS2". So, when a user submit a request it is stored in a different table (bands2) until it is confirmed by an admin.
So far everything is good - i made the page to make requests, and the biography is successfully copied into "BANDS2" table. I also made a page in my admin section where it lists all the modification requests, and when you click on the name of a biography it sends you to confirmation.php?groupe=BANDNAME
This is where i'm stuck. Here is what i need to do in confirmation.php:
- check if an entry with same 'title' is present in "NEWS2", if so : delete it, we want to replace it by the edited version from the other table (title is stored in $_GET "Groupe")
- take the whole row with same 'title' from "BANDS2" in the database and copy it into the table "NEWS2" so the biography become official and replace the one we just deleted
- and finally delete the old entry in "BANDS2" so it gets out of the modification-requests list and only keep the new version in "NEWS2"
the entries to be moved from "BANDS2" to "NEWS2" are: id, title, localisation, web, infos
if someone can just give me a script that would do this, i'd be MORE than grateful....
Thanks for your time!!!!!
<3