-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsave_booking.php
More file actions
47 lines (40 loc) · 1.44 KB
/
Copy pathsave_booking.php
File metadata and controls
47 lines (40 loc) · 1.44 KB
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
<header>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-sweetalert/1.0.1/sweetalert.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-sweetalert/1.0.1/sweetalert.min.js"></script>
<script>
function MySucessFn(){
swal({
title: "Dear User...Booking Details Saved Sucessfully",
text: "",
type: "success",
showConfirmButton: true,
},
window.load = function(){
window.location='http://localhost/lawyermanagementsystem/user_dashboard.php';
});
}
</script>
</header>
<?php
include_once 'db_con/dbCon.php';
$okFlag = TRUE;
if($okFlag){
$date = $_POST['date'];
$description = $_POST['description'];
$client_id = $_POST['client_id'];
$lawyer_id = $_POST['lawyer_id'];
/* echo $date ;
echo $description;
echo $client_id ;
echo $lawyer_id;exit;
*/
$conn = connect();
//Check duplicate value
// sql query for inserting data into database
$sql = "INSERT INTO `booking`(date, description, client_id, lawyer_id, status) VALUES('$date','$description','$client_id','$lawyer_id','Pending')";
//echo $sql;exit;
$result=mysqli_query($conn, $sql) or die(mysqli_error ($conn));
echo "<script type= 'text/javascript'>MySucessFn();</script>";
}
?>