2 * 1024 * 1024) { return -2; } else { if (!move_uploaded_file($file_tmp, $target_file)) { return -3; } } return 0; } function deluser($db, $delmail) { $requete = "UPDATE trajet SET mailproposition = $1 WHERE mailproposition = $2;"; $result1 = pg_query_params($db, $requete, array('utilisateur_supprime@local', $delmail)); $requete = "UPDATE reserver SET mailutilisateur = $1 WHERE mailutilisateur = $2;"; $result2 = pg_query_params($db, $requete, array('utilisateur_supprime@local', $delmail)); $requete = "DELETE FROM avis WHERE mailemetteur = $1;"; $result3 = pg_query_params($db, $requete, array($delmail)); $requete = "UPDATE voiture SET mail = $1 WHERE mail = $2;"; $result4 = pg_query_params($db, $requete, array('utilisateur_supprime@local', $delmail)); $requete = "DELETE FROM utilisateur WHERE mail = $1;"; $result5 = pg_query_params($db, $requete, array($delmail)); return $result1 && $result2 && $result3 && $result4 && $result5; } ?>