-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hospitalregistration.php
66 lines (55 loc) · 2 KB
/
Hospitalregistration.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html>
<head>
<title></title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="static/css/materialize.min.css" media="screen,projection"/>
<link rel="stylesheet" type="text/css" href="static/prelogin.css">
</head>
<body>
<div class="a1">
<?php
echo "<h3><p>Registered as hospital</p></h3>";
?>
</div>
<div class="a">
<p><em><h4>"Blood donation is a service to humankind."<h4></em></p>
</div>
<div class="container">
<div class="col s12 m6">
<div class="card white darken-1">
<div class="card-content black-text">
<span class="card-title">Login </span>
</div>
<div class="card-action">
<a href="Hospitallogin.html"><b>Click here to login</b></a>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
//mysql_connect('localhost','root','','hospitaldatabase')or die(mysql_error());
$conn=mysqli_connect("localhost","root","","blooddonation");
if(!$conn)
{
die("connection failed".mysqli_connect_error());
echo "fail";
}
$UHID=$_POST['UHID'];
$password=$_POST['password'];
$Name=$_POST['Name'];
$Address=$_POST['Address'];
$Contact1=$_POST['Contact1'];
$Contact2=$_POST['Contact2'];
$Email=$_POST['Email'];
$query2="insert into hospitaltable(UHID,password,Name,Address,Email) VALUES ('$UHID','$password','$Name','$Address','$Email')"; //Inserts the value to table users
$query3="insert into hospital_contact(UHID,Contact) VALUES ('$UHID','$Contact1')"; //Inserts the value to table users
$query4="insert into hospital_contact(UHID,Contact) VALUES ('$UHID','$Contact2')"; //Inserts the value to table users
//Inserts the value to table users
//$query=mysqli_query($con,$sql);
$result=$conn->query($query2);
$result=$conn->query($query3);
$result=$conn->query($query4);
?>