1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
| <html>
<head>
<style>
a:link{color="blue"}
a:hover{color="blue"}
a:visited{color="blue"}
</style>
<title>Modifier un OMT dans la base de données de l'Orne</title>
</head>
<body>
<?php
//=========================================
// information pour la connection à la DB
//=========================================
$host = 'XXX.XX.XXX.XX';
$user = '*******';
$pass = '********';
$db = 'XXX';
//======================
// connection à la DB
//======================
$link = mysql_connect ($host,$user,$pass) or die ('Erreur : '.mysql_error() );
mysql_select_db($db) or die ('Erreur :'.mysql_error());
//récupération des valeurs des champs:
//Poste Source:
$ps = $_POST["PosteSource"] ;
//Départ:
$dep = $_POST["Depart"] ;
//N° GDO:
$numg = $_POST["NumGDO"] ;
//Equipement:
$equip = addslashes($_POST ["EquipementPoser"]) ;
//Nom de poste:
$nomp = addslashes($_POST["NomPoste"]) ;
//Num affaire:
$numaff = addslashes($_POST["NumAffaire"]) ;
//Commune:
$comm = addslashes($_POST["Commune"]) ;
//Charge affaire:
$chrgaff = addslashes($_POST["Chargeaffaire"]) ;
//IPT:
$inter = addslashes($_POST["IPT"]);
//Radio rtc:
$radio = addslashes($_POST["RadioRTC"]) ;
//Position affaire:
$position = addslashes($_POST["Positionaff"]) ;
//Blocage:
$bloc = addslashes($_POST["Bloc"]) ;
//Commentaires:
$commen = addslashes($_POST["Comment"]) ;
//programme:
$prg = addslashes($_POST["PRG"]) ;
//Mex prevue:
$mexp = addslashes($_POST["MEXprev"]) ;
//Mex reelle:
$mexr = addslashes($_POST["MEXre"]) ;
//Mise en service:
$mes = addslashes($_POST["Misenserv"]) ;
//Modification schema exploit:
$modif = addslashes($_POST["Modifexploit"]) ;
//récupération de l'identifiant de la personne:
$ident = $_POST["id_omt"] ;
//création de la requête SQL:
$select = "UPDATE suivi_omt_orne
SET poste_source = '$ps',
depart = '$dep',
num_gdo_poste_a_equiper = '$numg',
equipement_a_poser = '$equip',
nom_de_poste = '$nomp',
num_affaire = '$numaff',
commune = '$comm',
charge_affaire = '$chrgaff',
ipt = '$inter',
radio_ou_rtc = '$radio',
position_affaire = '$position',
blocage = '$bloc',
commentaires = '$commen',
prg = '$prg',
mex_prevue = '$mexp',
mex_reelle = '$mexr',
mise_en_service = '$mes',
modification_schema_exploitation = '$modif'
WHERE id_omt = '$ident' " ;
//exécution de la requête SQL:
$result = mysql_query($select, $link) or die( mysql_error() ) ;
//affichage des résultats, pour savoir si la modification a marchée:
if($result)
{
echo("La modification à été correctement effectuée") ;
echo ' /<a href="http://XXX.XX.XXX.XX/acrbn/suivi_omt/suivi_general_omt.html">Page d\'accueil</a>';
}
else
{
echo("La modification à échouée") ;
echo ' /<a href="http://XXX.XX.XXX.XX/acrbn/suivi_omt/modification1_orne.php">Retour</a>';
}
?>
</body>
</html> |
Partager