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
| require_once('mysql.php');
//$_REQUEST['num_incdt'];
//$_REQUEST['incident'];
if($_REQUEST['incident'] == 1){
$sql_in = sprintf("INSERT INTO incident(NUMERO, TYPE_INCIDENT, ETAT, LOGIN, RELANCE) value ('%s', '%s', '%s', '%s', '%s' )",
mysql_real_escape_string($_REQUEST['num_incdt']),
mysql_real_escape_string('I'),
mysql_real_escape_string('A'),
mysql_real_escape_string($_SESSION['nom']),
mysql_real_escape_string('1'));
$result_in = $dbh->query($sql_in);
$message = "L'incident a bien ete cree.";
$message .= "<br/><br/><a href=index.php>Retour</a>";
echo $message;
}else{
$sql_dt = sprintf("INSERT INTO incident(NUMERO, TYPE_INCIDENT, ETAT, LOGIN, RELANCE) value ('%s', '%s', '%s', '%s', '%s' )",
mysql_real_escape_string($_REQUEST['num_incdt']),
mysql_real_escape_string('D'),
mysql_real_escape_string('A'),
mysql_real_escape_string($_SESSION['nom']),
mysql_real_escape_string('1'));
$result_dt = $dbh->query($sql_dt);
$message = "La demande de travaux a bien ete cree.";
$message .= "<br/><br/><a href=index.php>Retour</a>";
echo $message;
} |
Partager