-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangePassword.php
33 lines (30 loc) · 1.25 KB
/
ChangePassword.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
<?php include "theme/header.php"; ?>
<?php
if(strlen(session_id()) < 1) session_start();
if( !$_SESSION['loggedin']) header("Location: Login.php");
require_once "includes/Database_Configuration.php";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$UserID = $_SESSION['UserID'];
$sql = "SELECT Password FROM User WHERE Userid='$UserID'";
$row = $conn->query($sql)->fetch_row();
?>
<main>
<div class="sidebar__container">
<?php include "theme/sidebar.php"; ?>
</div>
<div class="form__container">
<h1 class="section-title">تغییر رمزعبور</h1>
<form action="ChangePasswordAction.php" method="POST">
<label for="password"> رمز عبور جدید</label>
<input type="text" name="Password" id="Password" placeholder="رمز عبور جدید را وارد کنید!">
<div>
<input data-aos="fade-left" type="submit" id="update-password" value="بروز رسانی" class="primary-button--cta">
<input data-aos="fade-left" type="reset" value="شروع مجدد!!" class="primary-button">
</div>
</form>
</div>
</main>
<?php include "theme/footer.php"; ?>