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
| if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ajoutref")) {
$insertSQL = sprintf("INSERT INTO comment_com (commentaireCom, heureCom, minuteCom, doc_newID) VALUES (%s, %s, %s, LAST_INSERT_ID())",
GetSQLValueString($_POST['commentaireCom'], "text"),
GetSQLValueString($_POST['heureCom'], "text"),
GetSQLValueString($_POST['minuteCom'], "text"),
GetSQLValueString($_POST['doc'], "text"));
mysql_select_db($database_interface_c14, $interface_c14);
$Result1 = mysql_query($insertSQL, $interface_c14) or die(mysql_error());
$insertGoTo = "../index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ajoutref")) {
$insertSQL = sprintf("INSERT INTO comment_exe (commentaireExe, iconeExe, heureExe, minuteExe, doc_newID) VALUES (%s, %s, %s, %s, LAST_INSERT_ID())",
GetSQLValueString($_POST['commentaireExe'], "text"),
GetSQLValueString($_POST['iconeExe'], "text"),
GetSQLValueString($_POST['heureExe'], "text"),
GetSQLValueString($_POST['minuteExe'], "text"),
GetSQLValueString($_POST['doc'], "text"));
mysql_select_db($database_interface_c14, $interface_c14);
$Result1 = mysql_query($insertSQL, $interface_c14) or die(mysql_error());
$insertGoTo = "../index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
} |
Partager