I searched a great deal for a solution to this problem, however i have had no luck in finding an answer, i am trying to archive a row from one table to another and then delete the row from the original table. I have the code set up how i think it should be but it only moves the record it does not delete it from the Original table.
mysql_connect('localhost', 'brokensky', 'password');
mysql_select_db('isad235database');
$select = filter_var($_POST['selectlist'],FILTER_SANITIZE_STRING);
$query = "INSERT INTO `serversarchive` (`Server_ID`,`Server_name` , `Location` , `MAC_Address` , `Port_Number` , `IP_Address`, `Operating_System`, `Administrator`, `Contact_Number`, `Email` , `Second_Contact`, `Second_Contact_Number`, `Comments`)
SELECT * FROM `servers`
WHERE `Server_ID` = '$select'; DELETE FROM server WHERE Server_ID = = '$select'";
As i have looked around for several hours with no decent answer to this, i think this could be useful to others also.