diff --git a/database/mydb.sql b/database/mydb.sql
index 43e4b0310a45daa20fc4a6caae8e40062172a39e..a6f56484b48ef5e018ccac81227210b38a2f7537 100644
--- a/database/mydb.sql
+++ b/database/mydb.sql
@@ -3,7 +3,7 @@
 -- http://www.phpmyadmin.net
 --
 -- Client :  localhost
--- Généré le :  Sam 13 Janvier 2024 à 15:38
+-- Généré le :  Dim 14 Janvier 2024 à 12:56
 -- Version du serveur :  5.7.11
 -- Version de PHP :  5.6.18
 
@@ -29,27 +29,29 @@ USE `mydb`;
 --
 
 DROP TABLE IF EXISTS `adherentsemail`;
-CREATE TABLE `adherentsemail` (
-  `AdherentID` int(11) NOT NULL DEFAULT '0',
+CREATE TABLE IF NOT EXISTS `adherentsemail` (
+  `AdherentmailID` int(11) NOT NULL AUTO_INCREMENT,
   `Nom` varchar(255) DEFAULT NULL,
   `Prenom` varchar(255) DEFAULT NULL,
   `AdresseMail` varchar(255) DEFAULT NULL,
   `Age` int(11) DEFAULT NULL,
-  `MotDePasse` varchar(255) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+  `MotDePasse` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`AdherentmailID`)
+) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
 
 --
 -- Contenu de la table `adherentsemail`
 --
 
-INSERT INTO `adherentsemail` (`AdherentID`, `Nom`, `Prenom`, `AdresseMail`, `Age`, `MotDePasse`) VALUES
+INSERT INTO `adherentsemail` (`AdherentmailID`, `Nom`, `Prenom`, `AdresseMail`, `Age`, `MotDePasse`) VALUES
 (0, 'chevalier', 'noemy', 'nono@email.com', 38, '$2y$10$KBJzTu7tBgUmGtQ1eyhImO6rc4Fb/JlnLD9OeQAkRUBFp.TcRfGX.'),
 (1, 'nathan', 'lantz', 'nathanlantz57560@gmail.com', 19, 'test1'),
 (2, 'nathan', 'lantz', 'nathanlantz57560@gmail.com', 19, 'test1'),
 (3, 'nathan', 'lantz', 'nathanlantz57560@gmail.com', 19, 'test1'),
 (4, 'lantz', 'theo', 'nathanlantz22@gmail.com', 22, 'test3'),
 (5, 'lantz', 'theo', 'nathanlantz22@gmail.com', 22, 'test3'),
-(6, 'mammeri', 'rayan', 'nathanlantz2022@gmail.com', 20, 'test4');
+(6, 'mammeri', 'rayan', 'nathanlantz2022@gmail.com', 20, 'test4'),
+(7, 'lantz', 'nathan', 'nathanlantz12@gmail.com', 29, '$2y$10$U1x..r4zlyU5kRKZIICRTutViXjwoCBvLmeez9KnO7MHcELLxZYx.');
 
 -- --------------------------------------------------------
 
@@ -58,20 +60,21 @@ INSERT INTO `adherentsemail` (`AdherentID`, `Nom`, `Prenom`, `AdresseMail`, `Age
 --
 
 DROP TABLE IF EXISTS `adherentstel`;
-CREATE TABLE `adherentstel` (
-  `AdherentID` int(11) NOT NULL DEFAULT '0',
+CREATE TABLE IF NOT EXISTS `adherentstel` (
+  `AdherenttelID` int(11) NOT NULL AUTO_INCREMENT,
   `Nom` varchar(255) DEFAULT NULL,
   `Prenom` varchar(255) DEFAULT NULL,
   `NumeroTelephone` varchar(255) DEFAULT NULL,
   `Age` int(11) DEFAULT NULL,
-  `MotDePasse` varchar(255) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+  `MotDePasse` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`AdherenttelID`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
 
 --
 -- Contenu de la table `adherentstel`
 --
 
-INSERT INTO `adherentstel` (`AdherentID`, `Nom`, `Prenom`, `NumeroTelephone`, `Age`, `MotDePasse`) VALUES
+INSERT INTO `adherentstel` (`AdherenttelID`, `Nom`, `Prenom`, `NumeroTelephone`, `Age`, `MotDePasse`) VALUES
 (0, 'lantz', 'nathan', '07 82 70 53 51', 28, '$2y$10$FAp2/7LGaFrqEeUbnm/nyOX2T1z1uLUl8h946xjy/3nnhy30TElP6'),
 (1, 'nathan', 'lantz', '07 82 70 53 51', 19, 'test2'),
 (2, 'bbbb', 'aaaa', '11111111', 15, 'aaa');
@@ -83,11 +86,12 @@ INSERT INTO `adherentstel` (`AdherentID`, `Nom`, `Prenom`, `NumeroTelephone`, `A
 --
 
 DROP TABLE IF EXISTS `admin`;
-CREATE TABLE `admin` (
-  `AdminID` int(11) NOT NULL,
+CREATE TABLE IF NOT EXISTS `admin` (
+  `AdminID` int(11) NOT NULL AUTO_INCREMENT,
   `password` varchar(255) NOT NULL,
-  `login` varchar(255) NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+  `login` varchar(255) NOT NULL,
+  PRIMARY KEY (`AdminID`)
+) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
 
 --
 -- Contenu de la table `admin`
@@ -103,12 +107,13 @@ INSERT INTO `admin` (`AdminID`, `password`, `login`) VALUES
 --
 
 DROP TABLE IF EXISTS `associationsportive`;
-CREATE TABLE `associationsportive` (
+CREATE TABLE IF NOT EXISTS `associationsportive` (
   `idAssociationSportive` int(11) NOT NULL,
   `nom` varchar(45) DEFAULT NULL,
   `adresse` varchar(45) DEFAULT NULL,
   `tel` varchar(45) DEFAULT NULL,
-  `siteweb` varchar(45) DEFAULT NULL
+  `siteweb` varchar(45) DEFAULT NULL,
+  PRIMARY KEY (`idAssociationSportive`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
@@ -125,12 +130,13 @@ INSERT INTO `associationsportive` (`idAssociationSportive`, `nom`, `adresse`, `t
 --
 
 DROP TABLE IF EXISTS `competitions`;
-CREATE TABLE `competitions` (
-  `CompetitionID` int(11) NOT NULL,
+CREATE TABLE IF NOT EXISTS `competitions` (
+  `CompetitionID` int(11) NOT NULL AUTO_INCREMENT,
   `Lieu` varchar(255) DEFAULT NULL,
   `Horaire` datetime DEFAULT NULL,
-  `PlacesDisponibles` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+  `PlacesDisponibles` int(11) DEFAULT NULL,
+  PRIMARY KEY (`CompetitionID`)
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
 
 --
 -- Contenu de la table `competitions`
@@ -151,7 +157,7 @@ INSERT INTO `competitions` (`CompetitionID`, `Lieu`, `Horaire`, `PlacesDisponibl
 --
 
 DROP TABLE IF EXISTS `documentsadministratifs`;
-CREATE TABLE `documentsadministratifs` (
+CREATE TABLE IF NOT EXISTS `documentsadministratifs` (
   `DocumentID` int(11) NOT NULL,
   `AdherentID` int(11) NOT NULL,
   `DossierInscription` blob,
@@ -165,8 +171,8 @@ CREATE TABLE `documentsadministratifs` (
 --
 
 DROP TABLE IF EXISTS `dossier_inscription`;
-CREATE TABLE `dossier_inscription` (
-  `ID` int(11) NOT NULL,
+CREATE TABLE IF NOT EXISTS `dossier_inscription` (
+  `ID` int(11) NOT NULL AUTO_INCREMENT,
   `Nom` varchar(50) NOT NULL,
   `Prenom` varchar(50) NOT NULL,
   `DateNaissance` date NOT NULL,
@@ -177,7 +183,8 @@ CREATE TABLE `dossier_inscription` (
   `NiveauExperience` varchar(50) DEFAULT NULL,
   `CertificatMedical` tinyint(1) NOT NULL,
   `AutorisationParentale` tinyint(1) NOT NULL,
-  `DateInscription` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+  `DateInscription` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
 -- --------------------------------------------------------
@@ -187,11 +194,12 @@ CREATE TABLE `dossier_inscription` (
 --
 
 DROP TABLE IF EXISTS `inscriptions`;
-CREATE TABLE `inscriptions` (
-  `InscriptionID` int(11) NOT NULL,
+CREATE TABLE IF NOT EXISTS `inscriptions` (
+  `InscriptionID` int(11) NOT NULL AUTO_INCREMENT,
   `AdherentID` int(11) NOT NULL,
   `MatchID` int(11) NOT NULL,
-  `DateInscription` datetime DEFAULT CURRENT_TIMESTAMP
+  `DateInscription` datetime DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`InscriptionID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
 -- --------------------------------------------------------
@@ -201,7 +209,7 @@ CREATE TABLE `inscriptions` (
 --
 
 DROP TABLE IF EXISTS `inscriptionscompetitions`;
-CREATE TABLE `inscriptionscompetitions` (
+CREATE TABLE IF NOT EXISTS `inscriptionscompetitions` (
   `InscriptionID` int(11) NOT NULL,
   `AdherentID` int(11) NOT NULL,
   `CompetitionID` int(11) NOT NULL,
@@ -230,11 +238,12 @@ INSERT INTO `inscriptionscompetitions` (`InscriptionID`, `AdherentID`, `Competit
 --
 
 DROP TABLE IF EXISTS `members`;
-CREATE TABLE `members` (
-  `MemberID` int(11) NOT NULL,
+CREATE TABLE IF NOT EXISTS `members` (
+  `MemberID` int(11) NOT NULL AUTO_INCREMENT,
   `password` varchar(255) DEFAULT NULL,
-  `login` varchar(255) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+  `login` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`MemberID`)
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
 
 --
 -- Contenu de la table `members`
@@ -248,7 +257,8 @@ INSERT INTO `members` (`MemberID`, `password`, `login`) VALUES
 (5, '$2y$10$/hUhuXb9cC9f/ks2TFs0y.K2NnFASCpsqkwcenIyRmmLYcj9rz5Vu', '07 82 70 53 53'),
 (6, '$2y$10$/mdgq7yq2MIJdT8thGJmweljdIRURGLHofYmy8MWFeQ2PITSL/N6G', '07 82 70 53 53'),
 (7, '$2y$10$k6euRX3qHWEkpCrxOa3QVeQgNsKGSMZRjehkPan4Xw5Gt/sZb6DNy', 'nathanlantz88@gmail.com'),
-(8, '$2y$10$5RQ25VRg8gFEu8eTtSjpJu9bv67CjF4dMCw.144mXphtQ.iqQfOua', '07 82 70 53 55');
+(8, '$2y$10$5RQ25VRg8gFEu8eTtSjpJu9bv67CjF4dMCw.144mXphtQ.iqQfOua', '07 82 70 53 55'),
+(9, '$2y$10$U1x..r4zlyU5kRKZIICRTutViXjwoCBvLmeez9KnO7MHcELLxZYx.', 'nathanlantz12@gmail.com');
 
 -- --------------------------------------------------------
 
@@ -257,7 +267,7 @@ INSERT INTO `members` (`MemberID`, `password`, `login`) VALUES
 --
 
 DROP TABLE IF EXISTS `planificationmatchs`;
-CREATE TABLE `planificationmatchs` (
+CREATE TABLE IF NOT EXISTS `planificationmatchs` (
   `MatchID` int(11) NOT NULL DEFAULT '0',
   `CompetitionID` int(11) NOT NULL DEFAULT '0',
   `Court` varchar(255) DEFAULT NULL,
@@ -291,13 +301,14 @@ INSERT INTO `planificationmatchs` (`MatchID`, `CompetitionID`, `Court`, `Horaire
 --
 
 DROP TABLE IF EXISTS `programme`;
-CREATE TABLE `programme` (
-  `ProgrammeID` int(11) NOT NULL,
+CREATE TABLE IF NOT EXISTS `programme` (
+  `ProgrammeID` int(11) NOT NULL AUTO_INCREMENT,
   `Nom` varchar(255) NOT NULL,
   `Description` text,
   `DateDebut` datetime NOT NULL,
-  `DateFin` datetime NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+  `DateFin` datetime NOT NULL,
+  PRIMARY KEY (`ProgrammeID`)
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
 
 --
 -- Contenu de la table `programme`
@@ -318,7 +329,7 @@ INSERT INTO `programme` (`ProgrammeID`, `Nom`, `Description`, `DateDebut`, `Date
 --
 
 DROP TABLE IF EXISTS `reservationscourts`;
-CREATE TABLE `reservationscourts` (
+CREATE TABLE IF NOT EXISTS `reservationscourts` (
   `ReservationID` int(11) NOT NULL,
   `AdherentID` int(11) NOT NULL,
   `HoraireReservation` datetime DEFAULT NULL
@@ -345,7 +356,7 @@ INSERT INTO `reservationscourts` (`ReservationID`, `AdherentID`, `HoraireReserva
 --
 
 DROP TABLE IF EXISTS `resultats`;
-CREATE TABLE `resultats` (
+CREATE TABLE IF NOT EXISTS `resultats` (
   `ResultatID` int(11) NOT NULL,
   `CompetitionID` int(11) NOT NULL,
   `Gagnant` varchar(255) DEFAULT NULL,
@@ -373,7 +384,7 @@ INSERT INTO `resultats` (`ResultatID`, `CompetitionID`, `Gagnant`, `Score`) VALU
 --
 
 DROP TABLE IF EXISTS `sponsors`;
-CREATE TABLE `sponsors` (
+CREATE TABLE IF NOT EXISTS `sponsors` (
   `idsponsors` int(11) NOT NULL,
   `nom` varchar(45) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -399,12 +410,13 @@ INSERT INTO `sponsors` (`idsponsors`, `nom`) VALUES
 --
 
 DROP TABLE IF EXISTS `telechargeable`;
-CREATE TABLE `telechargeable` (
-  `id` int(11) NOT NULL,
+CREATE TABLE IF NOT EXISTS `telechargeable` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
   `nom_dossier` varchar(255) NOT NULL,
   `type_document` varchar(50) NOT NULL,
-  `fichier_path` varchar(255) NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+  `fichier_path` varchar(255) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
 
 --
 -- Contenu de la table `telechargeable`
@@ -415,109 +427,6 @@ INSERT INTO `telechargeable` (`id`, `nom_dossier`, `type_document`, `fichier_pat
 (2, 'Programmes', 'PDF', '/chemin/vers/programmes.pdf'),
 (3, 'Calendriers des rencontres', 'PDF', '/chemin/vers/calendriers_rencontres.pdf');
 
---
--- Index pour les tables exportées
---
-
---
--- Index pour la table `adherentsemail`
---
-ALTER TABLE `adherentsemail`
-  ADD PRIMARY KEY (`AdherentID`);
-
---
--- Index pour la table `adherentstel`
---
-ALTER TABLE `adherentstel`
-  ADD PRIMARY KEY (`AdherentID`);
-
---
--- Index pour la table `admin`
---
-ALTER TABLE `admin`
-  ADD PRIMARY KEY (`AdminID`);
-
---
--- Index pour la table `associationsportive`
---
-ALTER TABLE `associationsportive`
-  ADD PRIMARY KEY (`idAssociationSportive`);
-
---
--- Index pour la table `competitions`
---
-ALTER TABLE `competitions`
-  ADD PRIMARY KEY (`CompetitionID`);
-
---
--- Index pour la table `dossier_inscription`
---
-ALTER TABLE `dossier_inscription`
-  ADD PRIMARY KEY (`ID`);
-
---
--- Index pour la table `inscriptions`
---
-ALTER TABLE `inscriptions`
-  ADD PRIMARY KEY (`InscriptionID`);
-
---
--- Index pour la table `members`
---
-ALTER TABLE `members`
-  ADD PRIMARY KEY (`MemberID`);
-
---
--- Index pour la table `programme`
---
-ALTER TABLE `programme`
-  ADD PRIMARY KEY (`ProgrammeID`);
-
---
--- Index pour la table `telechargeable`
---
-ALTER TABLE `telechargeable`
-  ADD PRIMARY KEY (`id`);
-
---
--- AUTO_INCREMENT pour les tables exportées
---
-
---
--- AUTO_INCREMENT pour la table `admin`
---
-ALTER TABLE `admin`
-  MODIFY `AdminID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
---
--- AUTO_INCREMENT pour la table `competitions`
---
-ALTER TABLE `competitions`
-  MODIFY `CompetitionID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
---
--- AUTO_INCREMENT pour la table `dossier_inscription`
---
-ALTER TABLE `dossier_inscription`
-  MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
---
--- AUTO_INCREMENT pour la table `inscriptions`
---
-ALTER TABLE `inscriptions`
-  MODIFY `InscriptionID` int(11) NOT NULL AUTO_INCREMENT;
---
--- AUTO_INCREMENT pour la table `members`
---
-ALTER TABLE `members`
-  MODIFY `MemberID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
---
--- AUTO_INCREMENT pour la table `programme`
---
-ALTER TABLE `programme`
-  MODIFY `ProgrammeID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
---
--- AUTO_INCREMENT pour la table `telechargeable`
---
-ALTER TABLE `telechargeable`
-  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
diff --git a/envoie.php b/envoie.php
index 8bdd0247f0e7bca0304f7ea5b2cea9659ca507a1..208a04de857fd81257d70d933f43454b76a9ae90 100644
--- a/envoie.php
+++ b/envoie.php
@@ -6,12 +6,11 @@ $dbname = "mydb";
 
 $conn = new mysqli($servername, $username, $password, $dbname);
 
-
 if ($_SERVER['REQUEST_METHOD'] === 'POST') {
     if (isset($_FILES['documentFile']) && $_FILES['documentFile']['error'] === UPLOAD_ERR_OK) {
         // Assurez-vous que l'ID de l'adhérent est fourni et qu'il s'agit d'un nombre
-        if (isset($_POST['adherentID']) && is_numeric($_POST['adherentID'])) {
-            $adherentID = intval($_POST['adherentID']);
+        if (isset($_POST['AdherentID']) && is_numeric($_POST['AdherentID'])) {
+            $adherentID = intval($_POST['AdherentID']);
         } else {
             die("L'ID de l'adhérent est manquant ou invalide.");
         }
diff --git a/evenementCSS.css b/evenementCSS.css
index da36115af5597caa0a7200156e1a294c0dae0116..3323b24e5d69e5eef81bb43e45ca3c75198ed399 100644
--- a/evenementCSS.css
+++ b/evenementCSS.css
@@ -1,6 +1,7 @@
 .evenement-page {
     font-family: 'kufam';
     color: black;
+    text-align: justify;
 }
 
 .flex-container {
diff --git a/indexCSS.css b/indexCSS.css
index 537bfa9b25fbba7bad9b1bb44396622f1901ff13..557a2b4a8fa3509d73634d65488c1ae1998a74d6 100644
--- a/indexCSS.css
+++ b/indexCSS.css
@@ -13,7 +13,7 @@
     font-size: 50px;
     text-align: left;
     margin-top: -820px;
-    margin-left: 211px;
+    margin-left: 11vh;
     font-weight: bold;
     color: black;
     position: absolute;
@@ -36,7 +36,7 @@
     font-size: 50px;
     text-align: left;
     margin-top: 100px;
-    margin-left: 211px;
+    margin-left: 11vh;
     font-weight: bold;
     color: black;
     position: relative;
diff --git a/inscription.php b/inscription.php
index d7207cef8a6c654c57e531abf110810b7f4f33b4..189c0d21397eaa7cb2b189401c401645b826d287 100644
--- a/inscription.php
+++ b/inscription.php
@@ -22,7 +22,7 @@
 <form method="POST" action="ScripInscription.php">
   <div class="EMail" id="emailSection">
     <div class="Rectangle13"></div>
-    <input type="email" id="Rectangle14" name="mail" size="25" required />
+    <input type="mail" id="Rectangle14" name="mail" size="25" required />
     <div class="EntreTonAdresseEMail">Entre ton adresse e-mail</div>
     <input type="password" id="Rectangle16" name="choisirmdp1" size="25" />
     <div class="ChoisirUnMotDePasse">Choisir un mot de passe</div>
@@ -59,5 +59,4 @@
 
 <?php require('footer.php'); ?>
 
-<script src="scriptinscription.js"></script>
-<script src="tel.js"></script>
\ No newline at end of file
+<script src="scriptinscription.js"></script>
\ No newline at end of file
diff --git a/membre.php b/membre.php
index 2588b39f658c69c1480635939038e4dd10cafeef..0e368b92acf47fce79382b6a4a062867951cdcaf 100644
--- a/membre.php
+++ b/membre.php
@@ -1,5 +1,62 @@
 <?php require('header.php'); ?>
 
+
+<?php
+// Traitement du formulaire d'envoi de document
+if ($_SERVER["REQUEST_METHOD"] == "POST") {
+    echo "Formulaire soumis.<br>";
+
+    if (isset($_FILES['documentFile'])) {
+        echo "Fichier détecté dans le formulaire.<br>";
+        var_dump($_FILES['documentFile']);
+
+        // Vérifier les erreurs de téléchargement
+        if ($_FILES['documentFile']['error'] == UPLOAD_ERR_OK) {
+            echo "Aucune erreur de téléchargement.<br>";
+
+            // Connexion à la base de données
+            $conn = new mysqli("localhost", "root", "root", "mydb");
+            if ($conn->connect_error) {
+                die("Connection failed: " . $conn->connect_error);
+            }
+
+            // Récupérer l'email ou le téléphone de l'utilisateur connecté
+            $userEmailOrPhone = $_SESSION['user_email_or_phone']; // Assurez-vous que cette session est bien définie
+
+            // Récupération et traitement du fichier
+            $file = $_FILES['documentFile']['tmp_name'];
+            $fileName = $_FILES['documentFile']['name'];
+
+            // Lecture du contenu du fichier
+            $fp = fopen($file, "r");
+            $content = fread($fp, filesize($file));
+            $content = addslashes($content);
+            fclose($fp);
+
+            // Préparation de la requête SQL
+            $sql = "INSERT INTO documentsadministratifs (AdherentID, DossierInscription) VALUES ('$userEmailOrPhone', '$content')";
+
+            // Exécution de la requête
+            if ($conn->query($sql) === TRUE) {
+                echo "Document envoyé avec succès.<br>";
+            } else {
+                echo "Erreur lors de l'envoi du document: " . mysqli_error($conn) . "<br>";
+            }
+
+            // Fermeture de la connexion
+            $conn->close();
+        } else {
+            echo "Erreur de téléchargement: " . $_FILES['documentFile']['error'] . "<br>";
+        }
+    } else {
+        echo "Aucun fichier dans le formulaire.<br>";
+    }
+} else {
+    echo "Le formulaire n'a pas été soumis.<br>";
+}
+
+?>
+
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -46,9 +103,7 @@
 
 <div class="document-upload">
     <h2>Envoyer vos Documents</h2>
-    <form id="documentForm" enctype="multipart/form-data">
-        <input type="hidden" id="adherentID" name="adherentID" value="<?php echo $adherentID; ?>">
-
+    <form id="documentForm" enctype="multipart/form-data" method="post">
         <label for="documentType">Type de Document :</label>
         <select id="documentType" name="documentType">
             <option value="carte_adherent">Carte d'Adhérent</option>
@@ -58,7 +113,8 @@
         <label for="documentFile">Sélectionnez le document à envoyer :</label>
         <input type="file" id="documentFile" name="documentFile" accept=".jpg, .jpeg, .png, .pdf">
         <br>
-        <button type="button" class="buttonUpload" onclick="submitDocument()">Envoyer</button>
+        <input type="hidden" name="form_type" value="upload_document">
+        <button type="submit" class="buttonUpload">Envoyer</button>
     </form>
 </div>
 
@@ -75,6 +131,4 @@
     </div>
 </div>
 
-<?php require('footer.php'); ?>
-
-<script src="scriptenvoie.js"></script>
\ No newline at end of file
+<?php require('footer.php'); ?>
\ No newline at end of file