Problème de traitement sql.php

Bonjour,

Je suis en train de créer un site immobilier et je suis devant le problème suivant, lorsque je suis dans la partie admin pour saisir un bien au moment où je valide la fiche, la page devient blanche et le site se bloque sur la page de traitement de SQL !!!

Voici le code :

<?php session_start() ; if(!isset($_SESSION["login"]) || $_SESSION["login"] == "") { header("Location: ./admin.php") ; } else { ?> N´goce Immobilier: ADMINISTRATION
N´goce Immobilier
Vivre: A MontpellierAutrementAilleurs
Catégorie: AncienNeuf Seuls les critères que vous aurez remplis s'afficheront pour l'utilisateur. Si Aucun critère n'est renseigné, la colonne ne s'affichera pas et la colonne de texte sera plus large. Pour Prix, Surface et Terrain, l'unité s'affiche automatiquement, ecrire seulement les chiffres. Pour les autres champs, si vous indiquez une surface, il faut préciser l'unité. ex: '62 m2' Toute cette colonne de critères s'affichera de manière identique en français et en anglais, sauf si vous écrivez 'oui' qui sera automatiquement traduit par 'Yes' dans la version anglaise. Ex: Piscine 'Oui' affichera Pool 'Yes' en anglais.
Lieu
Code postal
Nbr de pieces
Prix €
Surface m2
Terrain m2
Séjour
Chambre
Bureau
Salle de bain
Salle d'eau
Terrasse
Garage
Parking
Piscine
Titre FR
Texte FR
Titre anglais
Texte anglais
La photo n°1 est indispensable: Si elle est absente le bien ne s'affichera pas pour les utilisateurs tant qu'elle manquera. Dimensions de la plus grande image: 448x336 pixels. Format jpeg uniquement. Les images qui n'ont pas un format 4/3 seront automatiquement recadrées. La configuration du serveur limite la taille des images uploadés à 2Mo et la taille d'un envoi à 8Mo max au total.
Photo 1
Photo 2
Photo 3
Photo 4
Photo 5
Photo 6
Photo 7
Photo 8
Photo 9
Photo 10
Photo 11
Photo 12

LISTE DES BIENS | CRÉER NOUVEAU BIEN | DÉCONNEXION
<?php } ?>

je pense que pour mieux comprendre il manque la page traitement_sql.php

<?php require("./configuration.php"); // TRAITEMENT DES IMAGES UPLOADEES $dossier = './photos/'; // dossier de destination $extensions = array('.jpg', '.jpeg', '.JPG', '.JPEG'); // Extensions autorisées switch($action) { case "creer": // ON RECHERCHE L'ID MAXIMUM DE LA TABLE $resultat = mysql_query("SELECT max(id) FROM bien2") or die(mysql_error()); $idmax = mysql_result($resultat,0,"max(id)"); $idnew = $idmax+1; // PHOTO1 if($photo1 == "") { $photo1 = 0; if($_FILES['photo1']['error'] != 4){ $erreur[1] = $_FILES['photo1']['error']; } } else { $extension_photo1 = strrchr($_FILES['photo1']['name'], '.'); // On récupère l'extension du fichier uploadé $taille_photo1 = filesize($_FILES['photo1']['tmp_name']); // On récupère le poids $dimension_photo1 = getimagesize($_FILES['photo1']['tmp_name']); // On récupère les dimensions $largeur_photo1 = $dimension_photo1[0]; // Largeur $hauteur_photo1 = $dimension_photo1[1]; // Hauteur $src_y = 0; // Point d'origine vertical de la zone sélectionnée // TRAITEMENT PHOTO1: enregistrement sous 4 formats différents: S, M, L et XL if ($_FILES['photo1']['error'] == 0) { if(in_array($extension_photo1, $extensions)) //Si l'extension est dans le tableau { $photo1 = 1; $img_tmp = imagecreatefromjpeg($_FILES['photo1']['tmp_name']); // On regarde si la photo source fait 4/3 ou est plus allongée ou plus carrée $proportions = $hauteur_photo1 / $largeur_photo1; if($proportions == 0.75) { $hauteur_zoneselect = $hauteur_photo1; $largeur_zoneselect = $largeur_photo1; } elseif($proportions < 0.75) { //Selectionner une zone format 4/3 dans l'image: //Hauteur de la zone selectionnée: hauteur de l'image source. $hauteur_zoneselect = $hauteur_photo1; //Largeur de la zone selectionnée: hauteur de l'image source/0,75. $largeur_zoneselect = round($hauteur_photo1/0.75); } elseif($proportions > 0.75) { //Selectionner une zone format 4/3 dans l'image: //Largeur de la zone selectionnée: Largeur de l'image source. $largeur_zoneselect = $largeur_photo1; //Hauteur de la zone selectionnée: Largeur de l'image source*0,75. $hauteur_zoneselect = round($largeur_photo1*0.75); //Sélectionner une zone au milieu de l'image: $marge = $hauteur_photo1-$hauteur_zoneselect; $src_y = $marge/2; } // xl 450x338 $nom_photo1_xl = $idnew."-1-xl.jpg"; // On nomme le fichier en fonction de l'id du produit $photo1_xl = @imagecreatetruecolor(448,336) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo1_xl,$img_tmp,0,0,0,$src_y,448,336,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo1_xl, $dossier.$nom_photo1_xl, 80); // l 320x240 $nom_photo1_l = $idnew."-1-l.jpg"; // On nomme le fichier en fonction de l'id du produit $photo1_l = @imagecreatetruecolor(320,240) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo1_l,$img_tmp,0,0,0,$src_y,320,240,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo1_l, $dossier.$nom_photo1_l, 80); // m 160x120 $nom_photo1_m = $idnew."-1-m.jpg"; // On nomme le fichier en fonction de l'id du produit $photo1_m = @imagecreatetruecolor(160,120) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo1_m,$img_tmp,0,0,0,$src_y,160,120,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo1_m, $dossier.$nom_photo1_m, 80); // s 32x24 $nom_photo1_s = $idnew."-1-s.jpg"; // On nomme le fichier en fonction de l'id du produit $photo1_s = @imagecreatetruecolor(32,24) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo1_s,$img_tmp,0,0,0,$src_y,32,24,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo1_s, $dossier.$nom_photo1_s, 80); imagedestroy($img_tmp); } else { $erreur[1] = 9; // Le fichier uploadée n'a pas une extension autorisée (.jpg, .jpeg) } } else { $erreur[1] = $_FILES['photo1']['error']; } } // LES 11 AUTRES PHOTOS: seulement deux formats: S et XL $tab_photo[2] = $photo2; $tab_photo[3] = $photo3; $tab_photo[4] = $photo4; $tab_photo[5] = $photo5; $tab_photo[6] = $photo6; $tab_photo[7] = $photo7; $tab_photo[8] = $photo8; $tab_photo[9] = $photo9; $tab_photo[10] = $photo10; $tab_photo[11] = $photo11; $tab_photo[12] = $photo12; for($i=2; $i < 13 ; $i++) { if($tab_photo[$i] == "") { $tab_photo[$i] = 0; $current = "photo".$i; if($_FILES[$current]['error'] != 4){ $erreur[$i] = $_FILES[$current]['error']; } } else { $current = "photo".$i; $extension_photo = strrchr($_FILES[$current]['name'], '.'); // On récupère l'extension du fichier uploadé $taille_photo = filesize($_FILES[$current]['tmp_name']); // On récupère le poids $dimension_photo = getimagesize($_FILES[$current]['tmp_name']); // On récupère les dimensions $largeur_photo = $dimension_photo[0]; // Largeur $hauteur_photo = $dimension_photo[1]; // Hauteur $src_y = 0; // Point d'origine vertical de la zone sélectionnée // TRAITEMENT DES 11 PHOTOS SUIVANTES if ($_FILES[$current]['error'] == 0) { if(in_array($extension_photo, $extensions)) //Si l'extension est dans le tableau { $tab_photo[$i] = 1; $img_tmp = imagecreatefromjpeg($_FILES[$current]['tmp_name']); // On regarde si la photo source fait 4/3 ou est plus allongée ou plus carrée $proportions = $hauteur_photo / $largeur_photo; if($proportions == 0.75) { $hauteur_zoneselect = $hauteur_photo; $largeur_zoneselect = $largeur_photo; } elseif($proportions < 0.75) { //Selectionner une zone format 4/3 dans l'image: //Hauteur de la zone selectionnée: hauteur de l'image source. $hauteur_zoneselect = $hauteur_photo; //Largeur de la zone selectionnée: hauteur de l'image source/0,75. $largeur_zoneselect = round($hauteur_photo/0.75); } elseif($proportions > 0.75) { //Selectionner une zone format 4/3 dans l'image: //Largeur de la zone selectionnée: Largeur de l'image source. $largeur_zoneselect = $largeur_photo; //Hauteur de la zone selectionnée: Largeur de l'image source*0,75. $hauteur_zoneselect = round($largeur_photo*0.75); //Sélectionner une zone au milieu de l'image: $marge = $hauteur_photo-$hauteur_zoneselect; $src_y = $marge/2; } // xl 450x338 $nom_photo_xl = $idnew."-".$i."-xl.jpg"; // On nomme le fichier en fonction de l'id du produit $photo_xl = @imagecreatetruecolor(448,336) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo_xl,$img_tmp,0,0,0,$src_y,448,336,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo_xl, $dossier.$nom_photo_xl, 80); // s 32x24 $nom_photo_s = $idnew."-".$i."-s.jpg"; // On nomme le fichier en fonction de l'id du produit $photo_s = @imagecreatetruecolor(32,24) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo_s,$img_tmp,0,0,0,$src_y,32,24,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo_s, $dossier.$nom_photo_s, 80); imagedestroy($img_tmp); } else { $erreur[$i] = 9; // L'image uploadée n'a pas une extension autorisée (.jpg, .jpeg) } } else { $erreur[$i] = $_FILES[$current]['error']; } } } // CRÉATION DE LA RÉFERENCE if($vivre == "1"){ $prefixe = "mo"; } if($vivre == "2"){ $prefixe = "au"; } if($vivre == "3"){ $prefixe = "ai"; } if($categorie == "1"){ $suffixe = "a"; } if($categorie == "2"){ $suffixe = "n"; } $numero = sprintf("%03s",$idnew); $reference = $prefixe."-".$suffixe.$numero; // INSERTION DANS LA TABLE $modification = mysql_query( "INSERT INTO bien2 (id,reference,vivre,categorie,prix,surface,terrain,sejour,chambre,bureau,salle_de_bain,salle_d_eau,terrasse,garage,parking,piscine,photo1,photo2,photo3,photo4,photo5,photo6,photo7,photo8,photo9,photo10,photo11,photo12,lieu,code_postal,nbr_pieces) VALUES ('$idnew','$reference','$vivre','$categorie','$prix','$surface','$terrain','$sejour','$chambre','$bureau','$salle_de_bain','$salle_d_eau','$terrasse','$garage','$parking','$piscine','$photo1','$tab_photo[2]','$tab_photo[3]','$tab_photo[4]','$tab_photo[5]','$tab_photo[6]','$tab_photo[7]','$tab_photo[8]','$tab_photo[9]','$tab_photo[10]','$tab_photo[11]','$tab_photo[12]','$lieu','$code_postal','$nbr_pieces')") or die(mysql_error()); $modification = mysql_query("INSERT INTO bien_fr (id,titre,texte) VALUES ('$idnew','$titre_fr','$texte_fr')") or die(mysql_error()); $modification = mysql_query("INSERT INTO bien_en (id,titre,texte) VALUES ('$idnew','$titre_en','$texte_en')") or die(mysql_error()); // REDIRECTION VERS LA PAGE ADMIN if(isset($erreur)) { for ($i = 1; $i <= 12; $i++) { if(!empty($erreur[$i])) { $transmettre .= "&ep$i=$erreur[$i]";} } header("Location: ./admin_modifier.php?ref=$idnew$transmettre"); } else { header("Location: ./admin_liste.php"); } break; case "modifier": // TRAITEMENT PHOTO1 if(isset($supprimer_photo1)) // Si la checkbox supprimer photo n°1 est cochée { if (file_exists($dossier.$ref."-1-s.jpg")) { unlink($dossier.$ref."-1-s.jpg"); } if (file_exists($dossier.$ref."-1-m.jpg")) { unlink($dossier.$ref."-1-m.jpg"); } if (file_exists($dossier.$ref."-1-l.jpg")) { unlink($dossier.$ref."-1-l.jpg"); } if (file_exists($dossier.$ref."-1-xl.jpg")) { unlink($dossier.$ref."-1-xl.jpg"); } $photo1 = 0; } elseif($file_photo1 != "") // Si un fichier est chargé dans le input file photo1 { $extension_photo1 = strrchr($_FILES['file_photo1']['name'], '.'); // On récupère l'extension du fichier uploadé $taille_photo1 = filesize($_FILES['file_photo1']['tmp_name']); // On récupère le poids $dimension_photo1 = getimagesize($_FILES['file_photo1']['tmp_name']); // On récupère les dimensions $largeur_photo1 = $dimension_photo1[0]; // Largeur $hauteur_photo1 = $dimension_photo1[1]; // Hauteur $src_y = 0; // Point d'origine vertical de la zone sélectionnée // enregistrement sous 4 formats différents: S, M, L et XL if(in_array($extension_photo1, $extensions)) //Si l'extension est dans le tableau { $img_tmp = imagecreatefromjpeg($_FILES['file_photo1']['tmp_name']); // On regarde si la photo source fait 4/3 ou est plus allongée ou plus carrée $proportions = $hauteur_photo1 / $largeur_photo1; if($proportions == 0.75) { $hauteur_zoneselect = $hauteur_photo1; $largeur_zoneselect = $largeur_photo1; } elseif($proportions < 0.75) { //Selectionner une zone format 4/3 dans l'image: //Hauteur de la zone selectionnée: hauteur de l'image source. $hauteur_zoneselect = $hauteur_photo1; //Largeur de la zone selectionnée: hauteur de l'image source/0,75. $largeur_zoneselect = round($hauteur_photo1/0.75); } elseif($proportions > 0.75) { //Selectionner une zone format 4/3 dans l'image: //Largeur de la zone selectionnée: Largeur de l'image source. $largeur_zoneselect = $largeur_photo1; //Hauteur de la zone selectionnée: Largeur de l'image source*0,75. $hauteur_zoneselect = round($largeur_photo1*0.75); //Sélectionner une zone au milieu de l'image: $marge = $hauteur_photo1-$hauteur_zoneselect; $src_y = $marge/2; } // xl 450x338 $nom_photo1_xl = $ref."-1-xl.jpg"; // On nomme le fichier en fonction de l'id du produit $photo1_xl = @imagecreatetruecolor(448,336) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo1_xl,$img_tmp,0,0,0,$src_y,448,336,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo1_xl, $dossier.$nom_photo1_xl, 80); // l 320x240 $nom_photo1_l = $ref."-1-l.jpg"; // On nomme le fichier en fonction de l'id du produit $photo1_l = @imagecreatetruecolor(320,240) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo1_l,$img_tmp,0,0,0,$src_y,320,240,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo1_l, $dossier.$nom_photo1_l, 80); // m 160x120 $nom_photo1_m = $ref."-1-m.jpg"; // On nomme le fichier en fonction de l'id du produit $photo1_m = @imagecreatetruecolor(160,120) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo1_m,$img_tmp,0,0,0,$src_y,160,120,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo1_m, $dossier.$nom_photo1_m, 80); // s 32x24 $nom_photo1_s = $ref."-1-s.jpg"; // On nomme le fichier en fonction de l'id du produit $photo1_s = @imagecreatetruecolor(32,24) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo1_s,$img_tmp,0,0,0,$src_y,32,24,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo1_s, $dossier.$nom_photo1_s, 80); imagedestroy($img_tmp); $photo1 = 1; } else { $erreur = 1; // L'image uploadée n'a pas une extension autorisée (.jpg, .jpeg) } } // LES 11 AUTRES PHOTOS: seulement deux formats: S et XL $tab_photo[2] = $photo2; $tab_photo[3] = $photo3; $tab_photo[4] = $photo4; $tab_photo[5] = $photo5; $tab_photo[6] = $photo6; $tab_photo[7] = $photo7; $tab_photo[8] = $photo8; $tab_photo[9] = $photo9; $tab_photo[10] = $photo10; $tab_photo[11] = $photo11; $tab_photo[12] = $photo12; $tab_file_photo[2] = $file_photo2; $tab_file_photo[3] = $file_photo3; $tab_file_photo[4] = $file_photo4; $tab_file_photo[5] = $file_photo5; $tab_file_photo[6] = $file_photo6; $tab_file_photo[7] = $file_photo7; $tab_file_photo[8] = $file_photo8; $tab_file_photo[9] = $file_photo9; $tab_file_photo[10] = $file_photo10; $tab_file_photo[11] = $file_photo11; $tab_file_photo[12] = $file_photo12; $tab_supprimer_photo[2] = $supprimer_photo2; $tab_supprimer_photo[3] = $supprimer_photo3; $tab_supprimer_photo[4] = $supprimer_photo4; $tab_supprimer_photo[5] = $supprimer_photo5; $tab_supprimer_photo[6] = $supprimer_photo6; $tab_supprimer_photo[7] = $supprimer_photo7; $tab_supprimer_photo[8] = $supprimer_photo8; $tab_supprimer_photo[9] = $supprimer_photo9; $tab_supprimer_photo[10] = $supprimer_photo10; $tab_supprimer_photo[11] = $supprimer_photo11; $tab_supprimer_photo[12] = $supprimer_photo12; for($i=2; $i < 13 ; $i++) { if($tab_supprimer_photo[$i] == "1") // Si la checkbox supprimer photo n°1 est cochée { if (file_exists($dossier.$ref."-".$i."-s.jpg")) { unlink($dossier.$ref."-".$i."-s.jpg"); } if (file_exists($dossier.$ref."-".$i."-m.jpg")) { unlink($dossier.$ref."-".$i."-m.jpg"); } if (file_exists($dossier.$ref."-".$i."-l.jpg")) { unlink($dossier.$ref."-".$i."-l.jpg"); } if (file_exists($dossier.$ref."-".$i."-xl.jpg")) { unlink($dossier.$ref."-".$i."-xl.jpg"); } $tab_photo[$i] = 0; } elseif($tab_file_photo[$i] != "") // Si un fichier est chargé dans le input file photo1 { $current = "file_photo".$i; $extension_photo = strrchr($_FILES[$current]['name'], '.'); // On récupère l'extension du fichier uploadé $taille_photo = filesize($_FILES[$current]['tmp_name']); // On récupère le poids $dimension_photo = getimagesize($_FILES[$current]['tmp_name']); // On récupère les dimensions $largeur_photo = $dimension_photo[0]; // Largeur $hauteur_photo = $dimension_photo[1]; // Hauteur $src_y = 0; // Point d'origine vertical de la zone sélectionnée // enregistrement sous 4 formats différents: S, M, L et XL if(in_array($extension_photo, $extensions)) //Si l'extension est dans le tableau { $img_tmp = imagecreatefromjpeg($_FILES[$current]['tmp_name']); // On regarde si la photo source fait 4/3 ou est plus allongée ou plus carrée $proportions = $hauteur_photo / $largeur_photo; if($proportions == 0.75) { $hauteur_zoneselect = $hauteur_photo; $largeur_zoneselect = $largeur_photo; } elseif($proportions < 0.75) { //Selectionner une zone format 4/3 dans l'image: //Hauteur de la zone selectionnée: hauteur de l'image source. $hauteur_zoneselect = $hauteur_photo; //Largeur de la zone selectionnée: hauteur de l'image source/0,75. $largeur_zoneselect = round($hauteur_photo/0.75); } elseif($proportions > 0.75) { //Selectionner une zone format 4/3 dans l'image: //Largeur de la zone selectionnée: Largeur de l'image source. $largeur_zoneselect = $largeur_photo; //Hauteur de la zone selectionnée: Largeur de l'image source*0,75. $hauteur_zoneselect = round($largeur_photo*0.75); //Sélectionner une zone au milieu de l'image: $marge = $hauteur_photo-$hauteur_zoneselect; $src_y = $marge/2; } // xl 450x338 $nom_photo_xl = $ref."-".$i."-xl.jpg"; // On nomme le fichier en fonction de l'id du produit $photo_xl = @imagecreatetruecolor(448,336) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo_xl,$img_tmp,0,0,0,$src_y,448,336,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo_xl, $dossier.$nom_photo_xl, 80); // s 32x24 $nom_photo_s = $ref."-".$i."-s.jpg"; // On nomme le fichier en fonction de l'id du produit $photo_s = @imagecreatetruecolor(32,24) or die("Impossible de créer un flux d'image GD"); imagecopyresampled($photo_s,$img_tmp,0,0,0,$src_y,32,24,$largeur_zoneselect,$hauteur_zoneselect); imagejpeg($photo_s, $dossier.$nom_photo_s, 80); imagedestroy($img_tmp); $tab_photo[$i] = 1; } else { $erreur = 1; // L'image uploadée n'a pas une extension autorisée (.jpg, .jpeg) } } } // MISE A JOUR DE LA RÉFERENCE if($vivre == "1"){ $prefixe = "mo"; } if($vivre == "2"){ $prefixe = "au"; } if($vivre == "3"){ $prefixe = "ai"; } if($categorie == "1"){ $suffixe = "a"; } if($categorie == "2"){ $suffixe = "n"; } $numero = sprintf("%03s",$ref); $reference = $prefixe."-".$suffixe.$numero; $modification = mysql_query("UPDATE bien2 SET reference='$reference', vivre='$vivre', categorie='$categorie', prix='$prix', surface='$surface', terrain='$terrain', sejour='$sejour', chambre='$chambre', bureau='$bureau', salle_de_bain='$salle_de_bain', salle_d_eau='$salle_d_eau', terrasse='$terrasse', garage='$garage', parking='$parking', piscine='$piscine', photo1='$photo1', photo2='$tab_photo[2]', photo3='$tab_photo[3]', photo4='$tab_photo[4]', photo5='$tab_photo[5]', photo6='$tab_photo[6]', photo7='$tab_photo[7]', photo8='$tab_photo[8]', photo9='$tab_photo[9]', photo10='$tab_photo[10]', photo11='$tab_photo[11]', photo12='$tab_photo[12]', lieu='$lieu', code_postal='$code_postal', nbr_pieces='$nbr_pieces' WHERE id='$ref'"); $modification = mysql_query("UPDATE bien_fr SET titre='$titre_fr', texte='$texte_fr' WHERE id='$ref'"); $modification = mysql_query("UPDATE bien_en SET titre='$titre_en', texte='$texte_en' WHERE id='$ref'"); // REDIRECTION VERS LA PAGE ADMIN header("Location: ./admin_liste.php"); break; case "supprimer": // SUPPRESSION DES PHOTOS $resultat = mysql_query("SELECT * FROM bien2 WHERE id='$ref'") or die(mysql_error()); $obj = mysql_fetch_array($resultat); if($obj[photo1] == "1") { if (file_exists("./photos/".$obj[id]."-1-s.jpg")) { unlink("./photos/".$obj[id]."-1-s.jpg"); } if (file_exists("./photos/".$obj[id]."-1-m.jpg")) { unlink("./photos/".$obj[id]."-1-m.jpg"); } if (file_exists("./photos/".$obj[id]."-1-l.jpg")) { unlink("./photos/".$obj[id]."-1-l.jpg"); } if (file_exists("./photos/".$obj[id]."-1-xl.jpg")) { unlink("./photos/".$obj[id]."-1-xl.jpg"); } } for($i=2; $i < 13 ; $i++) { if($obj[photo.$i] == "1") { if (file_exists("./photos/".$obj[id]."-".$i."-s.jpg")) { unlink("./photos/".$obj[id]."-".$i."-s.jpg"); } if (file_exists("./photos/".$obj[id]."-".$i."-xl.jpg")) { unlink("./photos/".$obj[id]."-".$i."-xl.jpg"); } } } $modification = mysql_query("DELETE FROM bien2 WHERE id='$ref'"); $modification = mysql_query("DELETE FROM bien_fr WHERE id='$ref'"); $modification = mysql_query("DELETE FROM bien_en WHERE id='$ref'"); // REDIRECTION VERS LA PAGE ADMIN header("Location: ./admin_liste.php"); break; }

ya peu etre rien dans $action

Salut

déjà après tes requêtes tu pourrais rajouter la fonction

or die (mysql_error()) ;

cela pourrait t’aider à avoir un code d’erreur si le problème vient des requêtes SQL

:slight_smile: