-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathedit.php
executable file
·89 lines (53 loc) · 1.56 KB
/
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
<?php
session_start();
require_once "config.php";
$_SESSION['url'] = $_SERVER['REQUEST_URI'];
if (!isset($_SESSION["un"])) {
header("Location:login.php");
}
if (isset($_SESSION['un'])) {
$username = $_SESSION['un'];
}
if (isset($_GET['user'])) {
$data = $_GET['user'];
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Profile</title>
<?php include 'linkers.php';?>
</head>
<body>
<div class="main">
<?php require 'nav2.php';?>
<div class="upore">
<div class="col-sm-12 autto">
<div class=""><h3 style="text-align:center;"><?php echo "Update $username's Profile"; ?></h3></div>
</div>
</div>
<?php
$sql = "SELECT * FROM user WHERE name='$username'";
$send = mysqli_query($con, $sql);
$row = mysqli_fetch_array($send);
$pass = $row['pass'];
?>
<div class="upore container">
<div class="col-sm-6 autto upore">
<form action="update.php" method="POST">
<label for="ta">Email</label>
<input type="text" name="email" value="<?php echo ("$row[email]") ?>" class="form-control rb" required><br><br>
<label for="ta">Current Password</label>
<input type="password" name="statusold" value=""placeholder="Current Password" class="form-control rb" required><br><br>
<label for="ta">New Password</label>
<input type="password" name="statusnew" value=""placeholder="New Password" class="form-control rb"><br><br>
<input type="submit" class="btn btn-success" value="Update">
</form>
</div>
</div>
</div>
<?php require 'footer.php';?>
</body>
</html>