Daftar dan Belajar Sekarang!

Gagal upload video

foto ayenkmarley
2 Kontribusi 0 Coto
1 bulan yang lalu
Mohon Pencerahannya
<?php
	if(isset($_POST['submit']))
	{
		$koneksi = mysqli_connect("localhost", "root", "", "video");
		if (mysqli_connect_errno()){
			echo "Koneksi ke Database GAGAL !!!" . mysqli_connect_error();
		}
		
		$kode		= $_POST['kode'];
		$judul		= $_POST['judul'];
		$deskripsi	= $_POST['deskripsi'];
		$link		= $_POST['link'];
		$kategori  	= $_POST['kategori'];
		$sub	   	= $_POST['sub'];
		$durasi	   	= $_POST['durasi'];
		$user	   	= $_POST['user'];
		$hari	   	= $_POST['hari'];
		$tanggal   	= $_POST['tanggal'];
		$jam	   	= $_POST['jam'];
		$status	   	= $_POST['status'];

		mysqli_query($koneksi,"INSERT INTO `content` (`kode`, `judul`, `deskripsi`, `link`, `kategori`, `sub`, `durasi`, `user`, `hari`, `tanggal`, `jam`, `status`) VALUES (`$kode`, `$judul`, `$deskripsi`, `$link`, `$kategori`, `$sub`, `$durasi`, `$user`, `$hari`, `$tanggal`, `$jam`, `$status`)") 
			 or die ("Gagal Upload Video");
		header("location: index.php"); 
		mysqli_close($koneksi);
	}
?>
  • ada informasi error nya ga ? - abubakar

Jawaban
foto ayenkmarley
2 Kontribusi 0 Coto
1 bulan yang lalu
<!DOCTYPE HTML>
<html>
<head>
<title>Administrator - Video</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
 <!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!----webfonts--->
<link href='//fonts.googleapis.com/css?family=Cabin:400,400italic,500,500italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'>
<!---//webfonts---> 
 <!-- Meters graphs -->
<script src="js/jquery-1.10.2.min.js"></script>
<!-- Placed js at the end of the document so the pages load faster -->
</head> 
<body height="100%">
    <section style="min-height: 500px; max-height: 2000px;">
			<!-- header-starts -->
			<div class="header-section">
				<h2 align="center" style="padding-top: 10px"><b>UPLOAD VIDEO</b></h2>
			</div>
			<!-- //header-ends -->
			<div id="page-wrapper">
				<div class="graphs">
					<div class="panel-body panel-body-inputin">
						<form class="form-vertical" action="upload.php" method="POST">
							<div class="form-group">
								<div class="col-md-4">						
										<span class="input-group-addon">
											Kode Video
										</span>
										<input id="kode" name="kode" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">						
										<span class="input-group-addon">
											Judul Video
										</span>
										<input id="judul" name="judul" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">						
										<span class="input-group-addon">
											Link URL Video
										</span>
										<input id="link" name="link" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">						
										<span class="input-group-addon">
											Kategori Video
										</span>
										<input id="kategori" name="kategori" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">						
										<span class="input-group-addon">
											Sub Kategori
										</span>
										<input id="sub" name="sub" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">						
										<span class="input-group-addon">
											Durasi Video
										</span>
										<input id="durasi" name="durasi" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">						
										<span class="input-group-addon">
											Pengupload
										</span>
										<input id="user" name="user" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">
									<span class="input-group-addon">
										Pada Hari
									</span>
									<input id="hari" name="hari" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">
									<span class="input-group-addon">
										Pada Tanggal
									</span>
									<input id="tanggal" name="tanggal" type="date" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">
									<span class="input-group-addon">
										Pada Jam
									</span>
									<input id="jam" name="jam" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">
									<span class="input-group-addon">
										Status Video
									</span>
									<input id="status" name="status" type="text" class="form-control1" required>
								</div>
							</div>
							<div class="form-group">
								<div class="col-md-4">
										<span class="input-group-addon">
											Deskripsi
										</span>
										<textarea id="deskripsi" name="deskripsi" type="text" class="form-control1" required></textarea>
								</div>
							</div>
							<div class="form-group" style="float : right;">
									<div class="col-md-12">
										<button type="submit" class="btn-primary btn" name="submit" id="submit">Submit</button>
									</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</section>
	
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
   <script src="js/bootstrap.min.js"></script>
</body>
</html>


Login untuk diksusi di forum sekolah koding