-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsertTreatment.php
More file actions
80 lines (71 loc) · 2.7 KB
/
Copy pathinsertTreatment.php
File metadata and controls
80 lines (71 loc) · 2.7 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!-- Made By Bharat -->
<?php
$con = mysqli_connect("localhost","root","") or die ("Error Occures");
mysqli_select_db($con, "hospital_management_system") or die ("Error Occures");
error_reporting(0);
$tid = $_POST["tid"];
$tname = $_POST["tname"];
$res = $_POST["res"];
$sdate = $_POST["sdate"];
$edate = $_POST["edate"];
$pid = $_POST["pid"];
if($_POST["submit"]) {
$sql= "INSERT INTO treatment VALUES ('$tid','$tname','$res','$sdate','$edate','$pid')";
if(mysqli_query($con, $sql)) {
echo "Data Inserted Successfully";
}
else {
echo "Oops ! Something went wrong.Try again";
}
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/animate-custom.css" />
</head>
<body>
<div class="container">
<header><h1>Treatment Details</h1></header>
<section>
<div id="container_demo" >
<div id="wrapper">
<div id="login" class="animate form">
<form action="insertTreatment.php" method="POST">
<h1>Enter Treatment for Your Patient</h1>
<p>
<label data-icon="u" > Patient ID </label>
<input name="pid" required="required" type="text" placeholder="Patient ID"/>
</p>
<p>
<label data-icon="u" > Treatment ID </label>
<input name="tid" required="required" type="text" placeholder="Treatment ID"/>
</p>
<p>
<label data-icon="u" > Treatment Name </label>
<input name="tname" required="required" type="text" placeholder="Name of the treatment"/>
</p>
<p>
<label data-icon="u" > Results </label>
<input name="res" required="required" type="text" placeholder="result of the test"/>
</p>
<p>
<label data-icon="u" > Start Date </label>
<input name="sdate" required="required" type="text" placeholder="start date"/>
</p>
<p>
<label data-icon="u" > End Date </label>
<input name="edate" required="required" type="text" placeholder="end date"/>
</p>
<p class="login button">
<input type="submit" name="submit" value="Submit" />
</p>
</form>
</div>
</div>
</div>
</section>
</div>
</body>
</html>