Warning: move_uploaded_file(): The second argument to copy() function cannot be a directory in C:\xampp\htdocs\tableaux\ajout_image.php on line 17
if (isset($_POST["ajouter"])) {
$nom = $_POST["nom"];
$description = $_POST["description"];
$img = $_FILES["img"]["name"];
if (is_dir('./dossier_image/')) {
echo 'Le dossier existe';
} else {
echo 'Le dossier n\'existe pas';
}
$upload = './dossier_image/';
move_uploaded_file($_FILES["img"]["tmp_name"], $upload);
echo "je suis dans le isset";
$sql = "INSERT INTO imaget (img_yt,nom_yt,description_yt)VALUES('$img','$nom','$description')";
}