-
Notifications
You must be signed in to change notification settings - Fork 0
/
stu_profile.php
224 lines (209 loc) · 6.71 KB
/
stu_profile.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<?php
session_start();
include('../config.php');
error_reporting(0);
//require_once("config.php");
// Start up the session...
// Check for the status of the current session...
//if(!isset($_SESSION['Id']))
{
// if session is not active it will redirect the page to index page....
//<script language="javascript" type="text/javascript">
//window.location="../lke_admin.php?msg=expire";
//</script>
?>
<?php
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<title></title>
<!-- BOOTSTRAP CORE STYLE -->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONT AWESOME STYLE -->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLE -->
<link href="assets/css/style.css" rel="stylesheet" />
<!-- GOOGLE FONT -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
<script type="text/javascript">
function valid()
{
if(document.signup.password.value!= document.signup.confirmpassword.value)
{
alert("Password and Confirm Password Field do not match !!");
document.signup.confirmpassword.focus();
return false;
}
return true;
}
</script>
<script>
function checkAvailability() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_availability.php",
data:'emailid='+$("#emailid").val(),
type: "POST",
success:function(data){
$("#user-availability-status").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
</script>
</head>
<body>
<!------MENU SECTION START-->
<?php include('includes/header.php');?>
<!-- MENU SECTION END-->
<div class="content-wrapper">
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-4 col-md-offset-0" >
<div class="panel panel-info">
<?php
$user=$_SESSION['Id'];
//require_once("../config.php");
$query =mysql_query("select * from student where id='$user'");
$records = mysql_num_rows($query);
$row = mysql_fetch_array($query);
?>
<div class="panel-heading">
Welcome Mr/Mrs/Ms <?php echo $row['name'];?>
</div>
<div class="panel-body">
<form role="form" method="post">
<div class="form-group">
<label>Username</label>
<?php echo $row['usename'];?>
</div>
<div class="form-group">
<label>DOB</label>
<?php echo $row['dob'];?>
</div>
<div class="form-group">
<label>Email</label>
<?php echo $row['email'];?>
</div>
<div class="form-group">
<label>Mobile No</label>
<?php echo $row['mob'];?>
</div>
<div class="form-group">
<label>Gender</label>
<?php echo $row['mob'];?>
</div>
<div class="form-group">
<label>Course</label>
<?php echo $row['course'];?>
</div>
<div class="form-group">
<label>Branch</label>
<?php echo $row['branch'];?>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-8 col-md-offset-0">
<!-- Advanced Tables -->
<div class="panel panel-default">
<div class="panel-heading">
Profile
</div>
<div class="panel-body">
<div class="table-responsive">
<form name="signup" method="post" enctype="multipart/form-data">
<div class="form-group">
<div class="row">
<div class="col-md-6">
<label>Enter Full Name</label>
<input class="form-control" type="text" name="name" value="<?php echo $row['name'];?>" autocomplete="off" required />
</div>
<div class="col-md-3">
<label>Enter Gender</label>
<select class="form-control" type="text" name="gender" autocomplete="off" required />
<option value="<?php echo $row['gender'];?>"><?php echo $row['gender'];?></option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
<div class="col-md-3">
<label>Enter DOB</label>
<input class="form-control" type="date" name="dob" value="<?php echo $row['dob'];?>" autocomplete="off" required />
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-3">
<label>Mobile Number :</label>
<input class="form-control" type="text" name="mob" value="<?php echo $row['mob'];?>" autocomplete="off" required />
</div>
<div class="col-md-6">
<label>Enter Email</label>
<input class="form-control" type="email" name="email" id="emailid" value="<?php echo $row['email'];?>" onBlur="checkAvailability()" autocomplete="off" required />
<span id="user-availability-status" style="font-size:12px;"></span>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-md-4">
<label>Enter Username</label>
<input class="form-control" type="text" name="enroll" value="<?php echo $row['usename'];?>" autocomplete="off" required />
</div>
</div>
</div>
<div class="form-group">
<label>Enter Address</label>
<textarea class="form-control" name="addr" required autocomplete="off" /><?php echo $row['addr'];?></textarea>
</div>
<button type="submit" id="s33" name="s33" class="btn btn-info" id="submit">Update Now </button>
</form>
<?php
if(isset($_POST['s33']))
{
$id=$_SESSION['Id'];
$name=$_REQUEST['name'];
$gender=$_REQUEST['gender'];
$dob=$_REQUEST['dob'];
$desig=$_REQUEST['desig'];
$mob=$_REQUEST['mob'];
$email=$_REQUEST['email'];
$enroll=$_REQUEST['enroll'];
$addr=$_REQUEST['addr'];
date_default_timezone_set("Asia/Kolkata");
$apply=date("d-m-Y H:i:s");
$status="confirm";
$query =mysql_query("update student set usename='$enroll',email='$email',mob='$mob',gender='$gender',dob='$dob',name='$name' where id=$id");
echo '<script type="text/javascript">alert("Add Records");window.location=\'stu_profile.php\';</script>';
}
?>
</div>
</div>
</div>
<!--End Advanced Tables -->
</div>
</div>
</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<?php include('includes/footer.php');?>
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>
</body>
</html>