-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathedit-profile.php
108 lines (89 loc) · 3.43 KB
/
edit-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
<?php
session_start();
include('include/conn.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:login.php');
}
else{
$message="";
if(isset($dbh)){
//connection check
if (isset($_GET['id'])) {
$id = $_GET['id'];
$sql = "SELECT * FROM users WHERE id = :id";
$statement = $dbh->prepare($sql);
$statement->bindParam(':id', $id);
$statement->execute();
$profile = $statement->fetch(PDO::FETCH_ASSOC);
extract($profile);
}
include_once('include/header.php');
include_once('include/sidebar.php');
?>
<main class="app-content">
<div class="app-title">
<div>
<h1><i class="fa fa-edit"></i> Edit Profile</h1>
<p>Edit a single Profile</p>
</div>
<ul class="app-breadcrumb breadcrumb">
<li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
<li class="breadcrumb-item">Admin Profile</li>
<li class="breadcrumb-item"><a href="#">Edit Profile</a></li>
</ul>
</div>
<div class="row">
<div class="col-md-6 m-auto">
<div class="tile">
<h3 class="tile-title">Edit Profile</h3>
<div class="tile-body">
<form action="action/update-profile.php" method="post" class="form-horizontal" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?php echo $id ?>">
<div class="form-group row">
<label class="control-label col-md-3" for="name">Name <span class="text-danger">*</span></label>
<div class="col-md-9">
<input type="text" class="form-control" placeholder="Name" id="name" name="name" value="<?php echo $name ?>">
</div>
</div>
<div class="form-group row">
<label class="control-label col-md-3" for="email">Email <span class="text-danger">*</span></label>
<div class="col-md-9">
<input type="text" class="form-control" placeholder="Eamil" id="email" name="email" value="<?php echo $email ?>">
</div>
</div>
<div class="form-group row">
<label class="control-label col-md-3" for="mobile">Mobile <span class="text-danger">*</span></label>
<div class="col-md-9">
<input type="text" class="form-control" placeholder="Mobile" id="mobile" name="mobile" value="<?php echo $mobile ?>">
</div>
</div>
<div class="form-group row">
<label class="control-label col-md-3" for="password">Password <span class="text-danger">*</span></label>
<div class="col-md-9">
<input type="text" class="form-control" placeholder="Password" id="password" name="password" value="<?php echo $password ?>">
</div>
</div>
<div class="form-group row">
<label class="control-label col-md-3" for="image"> Image <span class="text-danger">*</span></label>
<div class="col-md-9">
<input type="file" class="form-control" id="image" name="image">
<img src="assets/<?php echo $image ?>" alt="!" style="max-height: 100px;margin-top: 10px;">
<input type="hidden" name="oldfile" value="<?php echo $image ?>">
</div>
</div>
</div>
<div class="tile-footer text-center">
<button class="btn btn-primary" type="submit" name="submit"><i class="fa fa-fw fa-lg fa-check-circle"></i>Update Course</button> <a class="btn btn-secondary" href="view-profile.php"><i class="fa fa-fw fa-lg fa-times-circle"></i>Cancel</a>
</div>
</form>
</div>
</div>
</div>
</main>
<?php
include_once('include/footer.php');
include_once('include/Hfooter.php');
}
}
?>