moutonton | Voici le principal pour le formulaire de MAJ :
Code :
- $editFormAction = $_SERVER['PHP_SELF'];
- if (isset($_SERVER['QUERY_STRING'])) {
- $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
- }
- if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1" )) {
- $updateSQL = sprintf("UPDATE t_objet SET obj_type=%s, obj_libelle=%s, obj_image=%s, obj_prix=%s, obj_divers=%s, obj_dimension=%s, obj_contraste=%s, obj_luminosite=%s, obj_resolution=%s, obj_angle=%s, obj_operateur=%s, obj_caracteristique=%s, obj_puissance=%s, obj_chargeurcd=%s, obj_cassette=%s, obj_tuner=%s, obj_GEQ=%s, obj_enregistreur=%s, obj_disquedur=%s, obj_gravure=%s, obj_lecture=%s, obj_mar_numero=%s WHERE obj_numero=%s",
- GetSQLValueString($_POST['obj_type'], "text" ),
- GetSQLValueString($_POST['obj_libelle'], "text" ),
- GetSQLValueString($obj_image, "text" ),
- GetSQLValueString($_POST['obj_prix'], "text" ),
- GetSQLValueString($_POST['obj_prix_stoller'], "text" ),
- GetSQLValueString($_POST['obj_divers'], "text" ),
- GetSQLValueString($_POST['obj_dimension'], "text" ),
- GetSQLValueString($_POST['obj_contraste'], "text" ),
- GetSQLValueString($_POST['obj_luminosite'], "text" ),
- GetSQLValueString($_POST['obj_resolution'], "text" ),
- GetSQLValueString($_POST['obj_angle'], "text" ),
- GetSQLValueString($_POST['obj_operateur'], "text" ),
- GetSQLValueString($_POST['obj_caracteristique'], "text" ),
- GetSQLValueString($_POST['obj_puissance'], "text" ),
- GetSQLValueString($_POST['obj_chargeurcd'], "text" ),
- GetSQLValueString($_POST['obj_cassette'], "text" ),
- GetSQLValueString($_POST['obj_tuner'], "text" ),
- GetSQLValueString($_POST['obj_GEQ'], "text" ),
- GetSQLValueString($_POST['obj_enregistreur'], "text" ),
- GetSQLValueString($_POST['obj_disquedur'], "text" ),
- GetSQLValueString($_POST['obj_gravure'], "text" ),
- GetSQLValueString($_POST['obj_lecture'], "text" ),
- GetSQLValueString($_POST['obj_mar_numero'], "int" ),
- GetSQLValueString($_POST['obj_numero'], "int" ));
- mysql_select_db($database_off_connexion, $off_connexion);
- $Result1 = mysql_query($updateSQL, $off_connexion) or die(mysql_error());
- $updateGoTo = "voir_offres.php";
- if (isset($_SERVER['QUERY_STRING'])) {
- $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
- $updateGoTo .= $_SERVER['QUERY_STRING'];
- }
- header(sprintf("Location: %s", $updateGoTo));
- }
|
|