-
Notifications
You must be signed in to change notification settings - Fork 0
/
Organisationregistration.php
66 lines (61 loc) · 2.17 KB
/
Organisationregistration.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 Organisation</p></h3>";
?>
</div>
<div class="container">
<div class="a">
<p><em><h4>"Individual commitment to a group effort - that is what makes a team work, a company work, a society work, a civilization work."</h4></em></p>
</div>
<div class="row">
<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="Organisationlogin.html"><b>Click here to login</b></a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
session_start();
//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";
}
$Username=$_POST['Username'];
$Password=$_POST['Password'];
$Name=$_POST['Name'];
$upcamp=$_POST['upcamp'];
$Associations=$_POST['Associations'];
$Contact=$_POST['Contact'];
$Email=$_POST['Email'];
$_SESSION['Username']= $Username;
$query="insert into organisationtable(Username,Password,Name,UpCamp,Associations,Contact,Email) VALUES ('$Username','$Password','$Name','$upcamp','$Associations','$Contact','$Email')";
//Inserts the value to table users
//$query=mysqli_query($con,$sql);
//$result=$conn->query($query);
if(mysqli_query($conn, $query)){
echo "Records inserted successfully.";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($conn);
}
mysqli_close($conn);
?>