-
Notifications
You must be signed in to change notification settings - Fork 2
/
connectINS.php
36 lines (22 loc) · 1.06 KB
/
connectINS.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
<?php
$p_ID = $_POST['p_ID'];
$ins_name = $_POST['ins_name'];
$ins_type = $_POST['ins_type'];
$vehicle_cate= $_POST['vehicle_cate'];
$min_grossAmount = $_POST['min_grossAmount'];
$max_grossAmount = $_POST['max_grossAmount'];
$start_date = $_POST['start_date'];
$conditions = $_POST['conditions'];
$description = $_POST['description'];
$conn = new mysqli ('localhost', 'root','', 'ysn' );
if($conn->connect_error) {
die('Connection Failed : ' .$conn->connection_error);
}else {
$stmt = $conn->prepare("insert into insurance(p_ID, ins_name,ins_type, vehicle_cate, min_grossAmount,max_grossAmount,start_date, conditions, description)values(?, ?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("sssssssss", $p_ID, $ins_name, $ins_type, $vehicle_cate,$min_grossAmount, $max_grossAmount, $start_date ,$conditions, $description);
$stmt->execute();
echo "<h1>Insurance Successfully...</h1>";
$stmt->close();
$conn->close();
}
?>