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
|
<body>
<?
// Redirection vers une autre page
$categ = $HTTP_POST_VARS["categ"];
$domaine = $HTTP_POST_VARS["domaine"];
$statut = $HTTP_POST_VARS["statut"];
$priorite1 = $HTTP_POST_VARS["priorite1"];
$priorite2 = $HTTP_POST_VARS["priorite2"];
$nature = $HTTP_POST_VARS["nature"];
$typ = $HTTP_POST_VARS["Typ"];
$sujet = $HTTP_POST_VARS["sujet"];
$description = $HTTP_POST_VARS["description"];
// Connection
$link = mysql_connect("localhost", "root", "");
mysql_select_db("incidents") or die(mysql_error());
// Protection des caracteres spéciaux
$sujet_protec = mysql_real_escape_string($sujet);
$description_protec = mysql_real_escape_string($description);
// Insertion valeur du formulaire
$query="INSERT INTO `ticket` VALUES ('','1','$statut','$priorite1','$priorite2','$nature','','$categ','$domaine','$typ','$sujet_protec','$description_protec','')";
$insert_formulaire = mysql_query($query)OR die( mysql_error());
header ('Location : PageViewTicketV5.php');
exit;
?>
</body> |
Partager