-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
fun_qurantine_Ward.php
49 lines (45 loc) · 1.12 KB
/
fun_qurantine_Ward.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
<?php
$con=mysqli_connect("localhost","root","asd32145","Covid_19_dbms");
if($con)
{
echo"Connection OK";
}
else
{
echo"Connection failed";
}
if(isset( $_POST['login_submit']))
{
$email=$_POST['email'];
$password=$_POST['password'];
$quary="SELECT * FROM login_tb WHERE email_id='$email' and password='$password'";
$result=mysqli_query($con,$quary);
if(mysqli_num_rows($result)==1)
{
header("Location:adminpanel.php");
}
else
{
echo"<script>alert('Error login')</script>";
echo"<script>window.open('login.php','_self')</script>";
}
}
$id=$_POST['id'];
$qname=$_POST['quarantine_name'];
$cap=$_POST['capacity'];
$city=$_POST['city'];
$prov=$_POST['provience'];
$phn=$_POST['phn_num'];
$hname=$_POST['head_name'];
if(isset($_POST['qur_submit']))
{
$quary="insert into quarantine_ward(quarantine_ward_id,quarantine_ward_name,capacity,city,province,phn_num,head_name)
Values ('$id','$qname','$cap','$city','$prov','$phn','$hname')";
$result=mysqli_query($con,$quary);
if($result)
{
echo"<script>alert('Data saved Successfully')</script>";
echo"<script>window.open('patients.php','_self')</script>";
}
}
?>