<?	
include ('logue.php'); 
include ('entete2.php');

$id = $_POST["id"];


$sql5 = "SELECT * FROM matgraph_mp WHERE id = '$id'";
$res5 = db_mysql_Query($sql5)or die('erreur sql<br>'.$sql5.'<br>'.mysql_error());
$row5 = mysql_fetch_array($res5);


$sql4 = "INSERT INTO `matgraph_mp_log` ( `id` , `lu` , `date` , `envoyeur` , `receveur` , `planete_receveur` , `planete_envoyeur` , `sujet` , `message` )
VALUES (
'$row5[id]', '$row5[lu]' , '$row5[date]' , '$row5[envoyeur]' , '$row5[receveur]' , '$row5[planete_receveur]' , '$row5[planete_envoyeur]' , '".addslashes($row5[sujet])."' , '".addslashes($row5[message])."'
)";

$res4 = db_mysql_Query($sql4)or die('erreur sql<br>'.$sql4.'<br>'.mysql_error());




$sql4 = "DELETE FROM matgraph_mp WHERE id = '$id'";
$res4 = db_mysql_Query($sql4)or die('erreur sql<br>'.$sql4.'<br>'.mysql_error());
echo '<script language="javascript" type="text/javascript">
<!--
window.location.replace("mp_lire_mp.php");
-->
</script>';
  
?>