<?php
include ("conecta.php");
$id = $_POST["idnovo"];
$dataedicao = $_POST["dataedicao"];
$datacriacao = $_POST["datacriacao"];
$statusgeral = $_POST["statusgeral"];
// Inserir dados no banco
$itens = $_POST['m'];
//$_POST['m'] as $itens
if (!empty($itens)){
$itens = implode(',', $_POST['m']);
}
$up= mysql_query("UPDATE retexr SET dataedicao = '$dataedicao', datacriacao = '$datacriacao', statusgeral = '$statusgeral', criadopor = '$criadopor', origem = '$origem', projet = '$projet', jalon = 'jalon', domaine = '$domaine', classification = '$classification', link = '$link', themes = '$themes', description = '$description',conseil = '$conseil', recidiv = '$recidiv', priorite = '$priorite', pilote = '$pilote', itens = '$itens', refstandard = '$refstandard', titre = '$titre', modif = '$modif', respect = '$respect', pourquoi = '$pourquoi', dataplan1 = '$dataplan1', action1 = '$action1', pilote1 = '$pilote1', metierp1 = '$metierp1', dateprevu1 = '$dateprevu1', datereal1 = '$datereal1', status1 = '$status1', link1 = '$link1', type1 = '$type1', datacomm1 = '$datacomm1', commentaire1 = '$commentaire1', suivre = '$suivre', dataplan2 = '$dataplan2', action2 = '$action2', altis2 = '$altis2', pilote2 = '$pilote2', metierp2 = '$metierp2', dateprevu2 = '$dateprevu2', datereal2 = '$datereal2', status2 = '$status2', link2 = '$link2', type2 = '$type2', datacomm2 = '$datacomm2', commentaire2 = '$commentaire2' WHERE id = '$id' ";");
$up= mysql_query($up) or die(mysql_error());
?>
<?php
if (mysql_affected_rows() > 0) {
echo '<script type="text/javascript">
alert("Salvo com Sucesso !");
window.history.go(-1);
</script>';
} else {
echo '<script type="text/javascript">
alert("Salvo sem Modificações !");
window.history.go(-1);
</script>';
}
?>
<?php
mysql_close($conexao);
?>
</body>
</html>