Commit 33e88ac2 by Oppir hutapea

penambahan field pilihan 1 dan 2

parent 58af10c5
......@@ -27,13 +27,15 @@ CREATE TABLE `mahasiswa_baru` (
`tanggal_lahir` date DEFAULT NULL,
`asal` varchar(200) DEFAULT NULL,
`nisn` int(50) DEFAULT NULL,
`npsm` int(50) DEFAULT NULL,
`npsn` int(50) DEFAULT NULL,
`no_peserta` int(50) DEFAULT NULL,
`tanggal_pelaksanaan` date DEFAULT NULL,
`no_handphone` int(20) DEFAULT NULL,
`pilihan_1` varchar(200) DEFAULT NULL,
`pilihan_2` varchar(200) DEFAULT NULL,
`sertifikat` varchar(200) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=latin1;
/*Data for the table `mahasiswa_baru` */
......
......@@ -63,7 +63,7 @@
<label for="title">
<h1>Pendaftaran USM Seleksi UTBK</h1>
</label>
<div class="form-group">
<label class="title">Nama</label>
......@@ -88,8 +88,8 @@
</div>
<div class="form-group">
<label class="title">NPSM</label>
<input type="text" name="npsm" class="form-control" placeholder="NPSM" required="">
<label class="title">NPSN</label>
<input type="text" name="npsn" class="form-control" placeholder="NPSN" required="">
</div>
<div class="form-group">
<label class="title">Nomor Peserta UTBK</label>
......@@ -103,11 +103,44 @@
<label class="title">No Handphone</label>
<input type="text" name="no_handphone" class="form-control" placeholder="No Handphone" required="">
</div>
<div class="form-group">
<label class="title">Pilihan 1</label>
<select name="pilihan_1" class="form-control" id="exampleFormControlSelect1">
<option>-</option>
<option>D-III Teknik Informatika</option>
<option>D-III Teknik Komputer</option>
<option>D-IV Teknik Informatika</option>
<option>S1 Teknik Informatika</option>
<option>S1 Sistem Informasi</option>
<option>S1 Teknik Elektro</option>
<option>S1 Manajemen Rekayasa</option>
<option>S1 Teknik Bioproses</option>
</select>
</div>
<div class="form-group">
<label class="title">Pilihan 2</label>
<select name="pilihan_2" class="form-control" id="exampleFormControlSelect1">
<option>-</option>
<option>D-III Teknik Informatika</option>
<option>D-III Teknik Komputer</option>
<option>D-IV Teknik Informatika</option>
<option>S1 Teknik Informatika</option>
<option>S1 Sistem Informasi</option>
<option>S1 Teknik Elektro</option>
<option>S1 Manajemen Rekayasa</option>
<option>S1 Teknik Bioproses</option>
</select>
</div>
</div>
<div class="form-group">
<label class="title">Sertifikat</label>
<label class="title">Sertifikat UTBK</label>
<p>
Cth Nama file : Sertifikat_utbk_nisn.pdf
</p>
<input type="file" name="sertifikat" class="form-control" placeholder="NISN" required="">
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" onclick="return checkData()">
<i class="glyphicon glyphicon-plus"></i> Tambah
......
......@@ -10,19 +10,21 @@ include 'function.php';
$tanggal_lahir = $_POST['tanggal_lahir'];
$asal = $_POST['asal'];
$nisn = $_POST['nisn'];
$npsm = $_POST['npsm'];
$npsn = $_POST['npsn'];
$no_peserta = $_POST['no_peserta'];
$tanggal_pelaksanaan = $_POST['tanggal_pelaksanaan'];
$no_handphone = $_POST['no_handphone'];
$pilihan_1 = $_POST['pilihan_1'];
$pilihan_2 = $_POST['pilihan_2'];
$sertifikat = $_FILES['sertifikat']['name'];
move_uploaded_file($_FILES['sertifikat']['tmp_name'], "file/" .$sertifikat);
$input=mysqli_query($conn, "INSERT INTO mahasiswa_baru (nama,tempat_lahir,tanggal_lahir,asal,nisn,npsm,no_peserta,tanggal_pelaksanaan,no_handphone,sertifikat) VALUES ('$nama','$tempat_lahir','$tanggal_lahir','$asal','$nisn','$npsm','$no_peserta','$tanggal_pelaksanaan','$no_handphone','$sertifikat')");
$input=mysqli_query($conn, "INSERT INTO mahasiswa_baru (nama,tempat_lahir,tanggal_lahir,asal,nisn,npsn,no_peserta,tanggal_pelaksanaan,no_handphone,pilihan_1,pilihan_2,sertifikat) VALUES ('$nama','$tempat_lahir','$tanggal_lahir','$asal','$nisn','$npsn','$no_peserta','$tanggal_pelaksanaan','$no_handphone','$pilihan_1','$pilihan_2','$sertifikat')");
if($input){
// echo "<script>alert('Data Berhasil Ditambah');document.location.href='upload.php'</script>";
// echo "<script>alert('Data Berhasil Ditambah');document.location.href='index.php'</script>";
echo "<script>alert('Data Berhasil Ditambah');document.location.href='http://spmb.del.ac.id/'</script>";
}else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment