-
Notifications
You must be signed in to change notification settings - Fork 4
/
profile.php
123 lines (92 loc) · 3.12 KB
/
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
<?php
session_start();
include('include/conn.php');
if(strlen($_SESSION['alogin'])==0)
{
header('location:login.php');
}
$stmt = $dbh->prepare("INSERT INTO `users`(`password`) VALUES (:password)");
$stmt->bindParam(':password', $password);
//insert File
$passwordtest = $_POST['password'];
$confirmpassword = $_POST['confirmpassword'];
//checkpassword
if($passwordtest == $confirmpassword){
$password = ($passwordtest);
if($stmt->execute()){
$message="Insert Row Scuccess";
header("Location:profile.php");
}
else{
$message="Insert Row Fail";
}
}
else{
$message="confirm password Not match!";
header("Location:register.php");
}
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> Profile Details</h1>
<p>profile show </p>
</div>
<ul class="app-breadcrumb breadcrumb">
<li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
<li class="breadcrumb-item">profile</li>
<li class="breadcrumb-item"><a href="#">view profile</a></li>
</ul>
</div>
<div class="row">
<div class="col-md-6 m-auto">
<div class="tile">
<h3 class="tile-title">Information</h3>
<div class="tile-footer text-center">
<?php
if(isset($_SESSION["image"])){
?>
<img class="app-sidebar__user-avatar" src="<?php echo $_SESSION["image"]; ?>" alt="User Image" style="height: 150px; width: 150px;">
<?php
}
else{
?>
<img class="app-sidebar__user-avatar" src="https://s3.amazonaws.com/uifaces/faces/twitter/jsa/48.jpg" alt="User Image">
<?php }?>
<div>
<?php
if(isset($_SESSION["name"])){
echo "<p class='app-sidebar__user-name'>".$_SESSION["name"]."</p>";
}
else{
?>
<p class="app-sidebar__user-name">Name problem!</p>
<?php
}
?>
<p class="app-sidebar__user-designation">Admin </p>
</div>
<div class="login-box2">
<h1>Change Password </h1>
<div class="form-group">
<label class="control-label">PASSWORD <span class="text-danger">*</span></label>
<input type="password" name="password" class="form-control" placeholder="Password" autocomplete="off" id="password">
</div>
<div class="form-group">
<label class="control-label">RE-TYPE PASSWORD <span class="text-danger">*</span></label>
<input type="password" name="confirmpassword" id="confirmpassword" class="form-control" placeholder="RE-type Password" autocomplete="off">
<span id='message'></span>
</div>
</div>
<a href="dashboard.php"> <button class="btn btn-secondary" type="submit" name="submit"><i class="fa fa-fw fa-lg fa-times-circle"></i>Cancel</button></a>
</div>
</form>
</div>
</div>
</div>
</main>
<?php
include_once('include/footer.php');
?>