<?php require 'includes/verif_session.php'; require 'includes/movie.php'; $film = new Movie(); if (isset($_POST['bouton'])) { //die($_FILES['image']['name']); if (!empty($_FILES['image']['name'])) { //die($_FILES['fichier']['name']); move_uploaded_file($_FILES['image']['tmp_name'], "./img/" . $_FILES['image']['name']); } $film->modifier_film(array($_POST['title'], $_POST['shortDescription'], $_POST['longDescription'], $_POST['director'], $_POST['year'], $_FILES['image']['name'], $_POST['num'])); header("Location: ./index.php"); } else { $result = $film->recuperer_film($_GET['mov_id']); $row = $result->fetch(); } ?> <!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <title>MyMovies</title> </head>