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
| if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "ajoutref")) {
$insertSQL = sprintf("INSERT INTO invitation (nom, lieu, salle, heure) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['nom'], "text"),
GetSQLValueString($_POST['lieu'], "text"),
GetSQLValueString($_POST['salle'], "text"),
GetSQLValueString($_POST['heure'], "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 amis (nom, prenom, sex, invitationID) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['nom'], "text"),
GetSQLValueString($_POST['prenom'], "text"),
GetSQLValueString($_POST['sex'], "text"),
GetSQLValueString($_POST['invitationID'], "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