-
Notifications
You must be signed in to change notification settings - Fork 0
/
student_edit.php
148 lines (112 loc) · 4.76 KB
/
student_edit.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
<?php
include 'connection.php';
session_start();
$ID= $_SESSION['log'];
$data= mysqli_query($con,"select * from student_registration join login_tb on student_registration.login_id=login_tb.login_id where login_tb.login_id='$ID'");
$row= mysqli_fetch_assoc($data);
if(isset($_POST['sub'])){
$name= $_POST['name'];
$mob= $_POST['mob'];
$email= $_POST['em'];
$col= $_POST['col'];
$usr= $_POST['usr'];
$pass= $_POST['pass'];
mysqli_query($con,"update login_tb set username='$usr', password='$pass' where login_id='$ID' ");
$log= mysqli_insert_id($con);
mysqli_query($con,"update student_registration set name='$name',mobile='$mob',email='$email',college='$col' where login_id='$ID' ");
echo "<script>alert('updated successfully')</script>";
echo "<script>window.location.href='student_profile.php'</script>";
}
?>
<!DOCTYPE html>
<html lang="zxx">
<head>
<meta charset="utf-8">
<title>Registration</title>
<!-- mobile responsive meta -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- ** Plugins Needed for the Project ** -->
<!-- Bootstrap -->
<link rel="stylesheet" href="plugins/bootstrap/bootstrap.min.css">
<!-- slick slider -->
<link rel="stylesheet" href="plugins/slick/slick.css">
<!-- themefy-icon -->
<link rel="stylesheet" href="plugins/themify-icons/themify-icons.css">
<!-- venobox css -->
<link rel="stylesheet" href="plugins/venobox/venobox.css">
<!-- card slider -->
<link rel="stylesheet" href="plugins/card-slider/css/style.css">
<!-- Main Stylesheet -->
<link href="css/style.css" rel="stylesheet">
<!--Favicon-->
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
</head>
<body>
<header class="navigation fixed-top">
<nav class="navbar navbar-expand-lg navbar-dark">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation"
aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse text-center" id="navigation">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact</a>
</li>
</ul>
</div>
</nav>
</header>
<!-- page-title -->
<section class="page-title bg-cover" data-background="images/backgrounds/page-title.jpg">
<div class="container">
<div class="row">
<div class="col-12 text-center">
<div class="col-md-6">
<div class="bg-white p-4">
<h3>Register</h3>
<form method="post" >
<table>
<input type="text" id="name" name="name" class="form-control mb-4 px-0" value="<?php echo $row['name'] ?>">
<input type="text" id="name" name="mob" class="form-control mb-4 px-0" value="<?php echo $row['mobile'] ?>">
<input type="email" id="name" name="em" class="form-control mb-4 px-0" value="<?php echo $row['email'] ?>">
<input type="text" id="name" name="col" class="form-control mb-4 px-0" value="<?php echo $row['college'] ?>">
<input type="text" id="name" name="usr" class="form-control mb-4 px-0" value="<?php echo $row['username'] ?>">
<input type="text" id="name" name="pass" class="form-control mb-4 px-0" value="<?php echo $row['password'] ?>">
<button class="btn btn-primary" name="sub" type="submit">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- /page-title -->
<!-- jQuery -->
<script src="plugins/jQuery/jquery.min.js"></script>
<!-- Bootstrap JS -->
<script src="plugins/bootstrap/bootstrap.min.js"></script>
<!-- slick slider -->
<script src="plugins/slick/slick.min.js"></script>
<!-- venobox -->
<script src="plugins/venobox/venobox.min.js"></script>
<!-- shuffle -->
<script src="plugins/shuffle/shuffle.min.js"></script>
<!-- apear js -->
<script src="plugins/counto/apear.js"></script>
<!-- counter -->
<script src="plugins/counto/counTo.js"></script>
<!-- card slider -->
<script src="plugins/card-slider/js/card-slider-min.js"></script>
<!-- google map -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCcABaamniA6OL5YvYSpB3pFMNrXwXnLwU&libraries=places"></script>
<script src="plugins/google-map/gmap.js"></script>
<!-- Main Script -->
<script src="js/script.js"></script>
</body>
</html>