Postingan lainnya
Satu data tidak masuk ke database,sedangkan data yg lain masuk
<?php
include '../../koneksi.php';
$intineraries = $_POST['intineraries'];
$inclusions = $_POST['inclusions'];
$exclusions = $_POST['exclusions'];
$terms_and_conditions = $_POST['terms_and_conditions'];
$price = $_POST['price'];
$nama_paket=$_POST['nama_paket'];
$kota = $_POST['kota'];
$foto_paket=$_FILES['foto_paket']['name'];
$foto_temp=$_FILES['foto_paket']['tmp_name'];
$foto_size=$_FILES['foto_paket']['size'];
$foto_type=$_FILES['foto_paket']['type'];
$folder = "gambar/";
if ($intineraries='' OR $inclusions=='' OR $exclusions=='' OR $terms_and_conditions=='' OR $price=='' OR $nama_paket==''OR$foto_paket=='') {
echo "<script>alert('Data Tidak Boleh Kosong !!');window.location='../../dashboard.php?page=form_in_detail_paket'</script>";
}else{
if ($foto_type =='image/jpg' OR $foto_type =='image/png' OR $foto_type =='image/jpeg') {
if ($foto_size < 1024000 ) {
move_uploaded_file($foto_temp, $folder . $foto_paket);
$query = mysqli_query($koneksi,"INSERT INTO paket_detail
(nama_paket,nama_kota,foto_paket,intineraries,inclusions,exclusions,terms_and_conditions,price)
VALUES
('$nama_paket','$kota','$foto_paket','$intineraries','$inclusions','$exclusions','$terms_and_conditions','$price')");
if ($query) {
echo "<script>alert('Data Berhasil Di Tambah');window.location='../../dashboard.php?page=input_paket_detail'</script>";
}else{
echo "gagal";
}
}else{
}
}else{
}
}
?>
<form action="page/in_paket_detail/act_in_paket_detail.php" method="POST" enctype="multipart/form-data"><br>
<div class="form-group">
<label for="recipient-name" class="form-label">Nama Paket</label>
<input type="text" class="form-control" id="recipient-name" name="nama_paket">
</div><br>
<select class="form-control" name="kota">
<?php $query=mysqli_query($koneksi,"SELECT * FROM kota");
while ($data=mysqli_fetch_array($query)) {
?>
<option value="<?php echo $data['nama_kota']; ?>"><?php echo $data['nama_kota']; ?></option>
<?php } ?>
</select><br><br>
<div class="custom-file">
<input type="file" class="custom-file-input" id="customFileLang" lang="es" name="foto_paket">
<label class="custom-file-label" for="customFileLang">Foto Paket</label>
</div><br><br><br>
<div class="form-group">
<label for="isiberita" class="form-label">Intineraries</label>
<textarea name="intineraries" class="ckeditor" id="ckeditor"></textarea>
</div><br><br><br><br>
<div class="form-group">
<label for="isiberita" class="form-label">Inclusions</label>
<textarea name="inclusions" class="ckeditor" id="ckeditor"></textarea>
</div><br>
<div class="form-group">
<label for="isiberita" class="form-label">Exclusions</label>
<textarea name="exclusions" class="ckeditor" id="ckeditor"></textarea>
</div><br>
<div class="form-group">
<label for="isiberita" class="form-label">Terms And Conditions</label>
<textarea name="terms_and_conditions" class="ckeditor" id="ckeditor" config.width="70%"></textarea>
</div><br>
<div class="form-group">
<label for="recipient-name" class="form-label">Price/person</label>
<input type="text" class="form-control" id="recipient-name" name="price">
</div><br><br><br>
<button class="btn bg-gradient-primary"><i class="mdi mdi-upload"></i>Upload</button>
</form>
0
Tanggapan
yang ga masuk data apa?
Belum ada Jawaban. Jadi yang pertama Jawaban
Login untuk ikut Jawaban