FOTO PHP
aksi.php <?php include 'koneksi.php'; $nama = $_POST['nama']; $kontak = $_POST['kontak']; $rand = rand(); $ekstensi = array('png','jpg','jpeg','gif'); $filename = $_FILES['file']['name']; $ukuran = $_FILES['file']['size']; $ext = pathinfo($filename, PATHINFO_EXTENSION); if(!in_array($ext,$ekstensi) ) { header("location:index.php?alert=gagal_ekstensi"); }else{ if($ukuran < 2544070){ $xx = $rand.'_'.$filename; move_uploaded_file($_FILES['file']['tmp_name'], 'file/'.$rand.'_'.$filename); $simpan = mysqli_query($koneksi, "INSERT INTO foto VALUES('','$nama','$kontak','$xx')"); header("location:index.php?alert=berhasil"); if ($simpan) { echo "<script>alert('File Berhasil Di Upload'); document.location.href='index.php</script>...