echo "L'image " . basename($_FILES["fileToUpload"]["name"]) . " a été ajouté. "; // Insérer un nouveau enregistrement dans la table PHOTO $category = "no category"; $season = "no season"; $title = basename($_FILES["fileToUpload"]["name"]); $description = "no description"; $link = $target_file; $unePhoto = new Photo(); //$unePhoto->setId( $_REQUEST['id'] ); $unePhoto->setCategory($category); $unePhoto->setSeason($season); $unePhoto->setTitle($title); $unePhoto->setDescription($description); $unePhoto->setLink($link); $unePhoto->setHidden(0); $dao = new PhotoDao(); $dao->create($unePhoto); } else { echo "Désolé, une erreur s'est produite."; } } // Source de : http://www.w3schools.com/ ?> <br/> <br/> <a href="./admin.php?what=photo"><b><u>Retourner à la gestion des photos</u></b></a> </div> </div> </body> </html>