-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinformant.php
More file actions
57 lines (33 loc) · 1.03 KB
/
informant.php
File metadata and controls
57 lines (33 loc) · 1.03 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
<html>
<head>
<title></title>
</head>
<body>
<form action="" method="POST">
<input type="radio" name="lit" value="Parent"/>Parent
<input type="radio" name="lit" value="T.B.A"/>T.B.A
<input type="radio" name="lit" value="Midwife"/>Midwife
<input type="radio"name="lit" value="Medical attendant"/>Medical attendant
<input type="radio" name="lit" value="others"/>others
<input type="submit" name="submit" value="submit"></button>
<form>
<?php
$conn=mysqli_connect("localhost","root","") or die(mysqli_error());
mysqli_select_db($conn,"health")or die(mysqli_error());
if (isset($_POST['submit'])){
$job=$_POST['lit'];
if($job==''){
echo '<script>window.alert("choose correct one")</script>';
}else {
$tim="insert into informant(informant)VALUES('$job')"or die(mysqli_error());
if(mysqli_query($conn,$tim)){
echo '<script>window.alert("insertation successfull")</script>';
}else{
echo '<script>window.alert("insert not successfull")</script>';
}
}
}
mysqli_close($conn);
?>
</body>
</html>