-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration-add-query.php
57 lines (57 loc) · 2.01 KB
/
registration-add-query.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
if($selisih>30){
echo "<script>
setTimeout(function() {
swal({
title: 'Gagal',
text: 'Lebih dari 30 Hari',
type: 'error'
}, function() {
window.location = 'registration';
});
}, 10);
</script>";
}elseif($terdaftar>0){
echo "<script>
setTimeout(function() {
swal({
title: 'Sudah Terdaftar',
text: 'Hanya dapat mendaftar sekali pada dokter, jadwal dan sesi yang sama',
type: 'error'
}, function() {
window.location = 'registration';
});
}, 10);
</script>";
}elseif(empty($error)){
$simpan=mysqli_query($koneksi,"INSERT INTO booking (id_booking, nama, alamat, kontak, id_catatan_medik, booking_tanggal, tanggal, jam, status, keterangan, id_dokter, id_sesi)
VALUES('','$nama','$alamat',
'$kontak','$id_catatan_medik','$booking_tanggal','$tanggal','$jam','$status','$keterangan',
'$id_dokter','$id_sesi')");
if($simpan){
echo "<script>
setTimeout(function() {
swal({
title: 'Antrian $antrian',
text: 'Mendaftar Poliklinik',
type: 'success'
}, function() {
window.location = 'registration';
});
}, 10);
</script>";
}else{
echo "<script>
setTimeout(function() {
swal({
title: 'Gagal',
text: 'Hilangkan Tanda Petik di Nama Pasien',
type: 'error'
}, function() {
window.location = 'registration';
});
}, 10);
</script>";
}
}
?>