-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_profile.php
More file actions
83 lines (83 loc) · 2.97 KB
/
edit_profile.php
File metadata and controls
83 lines (83 loc) · 2.97 KB
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
<?php
session_start();
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"lms");
$name = "";
$email = "";
$mobile = "";
$address = "";
$query = "select * from users where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($query_run)){
$name = $row['name'];
$email = $row['email'];
$mobile = $row['mobile'];
$address = $row['address'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>User Dashboard</title>
<meta charset="utf-8" name="viewport" content="width=device-width,intial-scale=1">
<link rel="stylesheet" type="text/css" href="bootstrap-4.4.1/css/bootstrap.min.css">
<script type="text/javascript" src="bootstrap-4.4.1/js/juqery_latest.js"></script>
<script type="text/javascript" src="bootstrap-4.4.1/js/bootstrap.min.js"></script>
<style type="text/css">
#side_bar{
background-color: whitesmoke;
padding: 50px;
width: 300px;
height: 450px;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="user_dashboard.php">Library Management System(LMS)</a>
</div>
<font style="color: white"><span><strong>Welcome: <?php echo $_SESSION['name'];?></strong></span></font>
<font style="color: white"><span><strong>Email: <?php echo $_SESSION['email'];?></strong></span></font>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown">My Profile</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="view_profile.php">View Profile</a>
<a class="dropdown-item" href="edit_profile.php"> Edit Profile</a>
<a class="dropdown-item" href="change_password.php">Change Password</a>
</div>
</li>
<li class="nav-item"><a class="nav-link" href="logout.php">Logout</a></li>
</ul>
</div>
</nav><br>
<span><marquee>This is library Management System. Library opens at 8:00 AM and close at 8:00 PM</marquee></span><br><br>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form action="update.php" method="post">
<div class="form-group">
<label>Name:</label>
<input type="text" class="form-control" value="<?php echo $name;?>" name="name">
</div>
<div class="form-group">
<label>Email:</label>
<input type="text" class="form-control" value="<?php echo $email;?>" name="email">
</div>
<div class="form-group">
<label>Mobile:</label>
<input type="text" class="form-control" value="<?php echo $mobile;?>" name="mobile">
</div>
<div class="form-group">
<label>Address:</label>
<textarea rows="3" cols="40" name="address" class="form-control"><?php echo $address;?></textarea>
</div>
<button type="submit" name="update" class="btn btn-primary">Update</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</body>
</html>