Postingan lainnya
Kelas Premium!
Belajar bikin website dari nol sekarang
Gunakan kupon "lebihcepat" untuk diskon 25%!
Upload Gambar dan Vidio Dengan Php masih bermasalah
if (isset($_POST['submitButtonKlick'])) {
include 'connection.php';
$movieName = $_POST['movieName'];
$description = $_POST['description'];
$nameVideo = $_FILES['video']['name'];
//$sizeVideo = $_FILES['video']['size'];
//$typeVideo = $_FILES['video']['type'];
$tmpVideo = $_FILES['video']['tmp_name'];
$pathVideo = './uploadFilm/' . $nameVideo;
$nameImage = $_FILES['image']['name'];
//$sizeImage = $_FILES['image']['size'];
//$typeImage = $_FILES['image']['type'];
$tmpImage = $_FILES['image']['tmp_name'];
$pathImage = './uploadBanner/' . $nameImage;
$movieDuration = $_POST['movieDuration'];
$realeaseYear = $_POST['realeaseYear'];
$trailerLink = $_POST['trailerLink'];
$genreOne = $_POST['genreOne'];
$genreTwo = $_POST['genreTwo'];
$genreTree = $_POST['genreTree'];
if (move_uploaded_file($tmpVideo, $pathVideo) && move_uploaded_file($tmpImage, $pathImage)) {
$query = mysqli_query($connection, "insert into moviedata values('','$movieName ','$description','$movieFile','$bannerImage','$movieDuration','$realeaseYear','$trailerLink','$genreOne','$genreTwo','$genreTree')");
if ($query) {
echo "<span class='d-block p-2 bg-primary text-white'>UPLOAD BERHASIL</span>";
echo "<meta http-equiv='refresh' content='5; url=dashboard.php'>";
}
} else {
echo "<span class='d-block p-2 bg-danger text-white'>UPLOAD GAGAL</span>";
//echo "<meta http-equiv='refresh' content='5; url= dashboard.php'>";
}
}
?>
0
Tanggapan
Pertanyaan kamu tidak jelas, coba dijelaskan lebih baik
1 Jawaban:
<div>apa ada yang tau letak kesalahnya ... , codingannya saya ngikutin codingan saya yang sebelumnya berhasil</div>
0