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
| <?php
$hostname_telecom = "localhost";
$database_telecom = "suged";
$username_telecom = "root";
$password_telecom = "";
$telecom = mysql_connect($hostname_telecom, $username_telecom, $password_telecom) or die(mysql_error());
mysql_select_db($database_telecom ,$telecom) or die ('erreur de connexion base');
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$date=$_POST["date"];
$numtel=$_POST["numtel"];
$responsableessai=$_POST["responsableessai"];
$aiguillage=$_POST["aiguillage"];
$constatation=$_POST["constatation"];
if ($constatation='be')
$constatation1='resolu';// le champ ajouté dans le cas ou la valeur de constatation es "be"
$requete="insert into typedérangement (numteld,responsableessai,resultatessai,constatation,date,étatdérangement )
values ('".$numtel."', '".$responsableessai."', '".$aiguillage."', '".$constatation."', '".$date."','".$date."''".$constatation1."')";
$resultat=mysql_query($requete) or die(mysql_error());
?>
</body>
</html> |
Partager