-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathview_details.php
142 lines (113 loc) · 4.67 KB
/
view_details.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
$host = "localhost";
$port = 3306;
$socket = "";
$user = "root";
$password = "";
$dbname = "map";
$name = $_POST['user_name'];
$user_password = $_POST['password'];
$con = new mysqli($host, $user, $password, $dbname, $port, $socket)
or die ('Could not connect to the database server' . mysqli_connect_error());
//WHERE user_name='$name' AND password='$user_password'"
$query = "SELECT user_id, user_name, password,gender,address,pin_code
FROM user_profile_details
WHERE user_name='$name' AND password='$user_password'";
//echo $query;
/*$query = "SELECT user_id, user_name, password,gender,address,pin_code
FROM user_profile_details
";
*/
if ($stmt = $con->prepare($query))
{
$stmt->execute();
$stmt->bind_result($user_id, $user_name, $password,$gender,$address,$pin_code);
//echo json_encode($stmt);
while ($stmt->fetch())
{
}
}
//read_db_emergency_contact_details($user_id);
$stmt->close();
//$con->close();
?>
<html>
<head>
<title>Login </title>
<meta charset="utf-8">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<script src="bootstrap/js/bootstrap.min.js"></script>
<link rel=stylesheet href='css/a.css'>
<style type="text/css">
body
{
background: -webkit-linear-gradient(315deg, #0e7fef 0%, #00a7c9 44%, #00d3a2 100%), -webkit-linear-gradient(45deg, #f20e6d 0%, rgba(242, 14, 109, 0.93) 7%, rgba(0, 211, 162, 0) 100%);
background: linear-gradient(135deg, #0e7fef 0%, #00a7c9 44%, #00d3a2 100%), linear-gradient(45deg, #f20e6d 0%, rgba(242, 14, 109, 0.93) 7%, rgba(0, 211, 162, 0) 100%);
}
</style> </head>
<body>
<div class="container">
<center><h2>Existing User</h2></center>
<center><h4><strong>Personal Details of User:</strong></h4>
<form action="read_emergency_contact_details.php" method="post" class="form-horizontal" name="view_details" role="form">
<input type="hidden" name="user_id" value ='<?php echo $user_id?>' readonly/>
<input type="hidden" name="user_name" value ='<?php echo $_POST['user_name']?>' />
<input type="hidden" name="password" value ='<?php echo $_POST['password']?>'/>
<table class="table table-bordered">
<tbody>
<tr>
<th>Name of Applicant</th>
<td><input type="text" name="name" pattern="[a-zA-Z ]+" title="Only Alphabets are allowed" value=<?php echo$user_name;?> readonly></td>
</tr>
<tr>
<th>Gender </th>
<td>
<?php
if($gender == 'M')
{
?>
<input type="radio" name="gender" id="gender" checked="checked" value="Male" readonly> Male   
<input type="radio" name="gender" id="gender" value="Female" readonly> Female   
<input type="radio" name="gender" id="gender" value="Third Gender" readonly> Third Gender
</td>
<?php
}
else if($gender == 'F')
{
?>
<input type="radio" name="gender" id="gender" value="Male" readonly> Male   
<input type="radio" name="gender" id="gender" checked="checked" value="Female" readonly> Female   
<input type="radio" name="gender" id="gender" value="Third Gender" readonly> Third Gender
</td>
<?php
}
else if($gender == 'T')
{
?>
<input type="radio" name="gender" id="gender" value="Male" > Male   
<input type="radio" name="gender" id="gender" value="Female"> Female   
<input type="radio" name="gender" id="gender" checked="checked" value="Third Gender" > Third Gender
</td>
<?php
}
?>
</tr>
<tr>
<th> Address</th>
<td><textarea type="text" name="address" id="address1" rows="3" columns="6" style="width:280px; resize:none;" readonly ><?php echo $address; ?></textarea > </td>
</tr>
<tr>
<th>Pin code</th>
<td><input type="text" pattern="^\d{6}$" name="pc" minlength="6" maxlength="6" value=<?php echo$pin_code;?> readonly></td>
</tr>
</tbody>
</table>
<br><br>
<input type="submit" height= "500px" class="btn btn-primary" value="View Emergency contacts" readonly/>
</form>
</div>
</body>
</html>
<?php
$con->close();
?>