-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforgotpassword.php
112 lines (104 loc) · 14.6 KB
/
forgotpassword.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
<!DOCTYPE html>
<html>
<head>
<title>Forgot Password</title>
<link rel="stylesheet" type="text/css" href="css/forgot.css">
<link href="css/all.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/animate.css">
<link href="https://fonts.googleapis.com/css?family=Bebas+Neue|Sulphur+Point|Tomorrow|Ubuntu&display=swap" rel="stylesheet">
<?php include_once 'dbConfig.php'; ?>
<script type="text/javascript">
function changeImg(){
setTimeout(function(){
document.getElementById("img").src="img/reset_new.svg"; }, 200);
}
function unchangeImg(){
setTimeout(function(){
document.getElementById("img").src="img/reset.svg"; }, 200);
}
function changeProfile(){
setTimeout(function(){
document.getElementById("profile").src="img/profile_new.svg"; }, 200);
}
function unchangeProfile(){
setTimeout(function(){
document.getElementById("profile").src="img/profile_pic.svg"; }, 200);
}
</script>
</head>
<body>
<?php
if (isset($_POST['reset'])){
$user_name = stripslashes($_REQUEST['username']);
$username = mysqli_real_escape_string($conn,$user_name);
$pword = stripslashes($_REQUEST['password']);
$password = mysqli_real_escape_string($conn,$pword);
$re_pword = stripslashes($_REQUEST['Repeat_Password']);
$re_password = mysqli_real_escape_string($conn,$re_pword);
if($password==$re_password){
$query = "UPDATE sign SET pword='$re_password' WHERE usrname='$username'";
$result = mysqli_query($conn,$query);
if(!$result){
echo '<script type="text/javascript"> alert("Update Not Successful")</script>';
}
else{
header("refresh:1;url=forgotpassword.php");
}
}
}
?>
<div class="container">
<div class="img">
<img id="img" onmouseover="changeImg()" onmouseout="unchangeImg()" src="img/reset.svg">
</div>
<div class="reset-form">
<form action="" method="post">
<img onmouseover="changeProfile()" onmouseout="unchangeProfile()" id="profile" class="profile" src="img/profile_pic.svg">
<svg id="reset_svg" width="1107" height="113" viewBox="0 0 1107 113" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M55.0766 109L31.1726 67.96H15.3326V109H2.22864V8.632H34.6286C42.2126 8.632 48.5966 9.928 53.7806 12.52C59.0606 15.112 62.9966 18.616 65.5886 23.032C68.1806 27.448 69.4766 32.488 69.4766 38.152C69.4766 45.064 67.4606 51.16 63.4286 56.44C59.4926 61.72 53.5406 65.224 45.5726 66.952L70.7726 109H55.0766ZM15.3326 57.448H34.6286C41.7326 57.448 47.0606 55.72 50.6126 52.264C54.1646 48.712 55.9406 44.008 55.9406 38.152C55.9406 32.2 54.1646 27.592 50.6126 24.328C47.1566 21.064 41.8286 19.432 34.6286 19.432H15.3326V57.448Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M161.838 66.52C161.838 69.016 161.694 71.656 161.406 74.44H98.334C98.814 82.216 101.454 88.312 106.254 92.728C111.15 97.048 117.054 99.208 123.966 99.208C129.63 99.208 134.334 97.912 138.078 95.32C141.918 92.632 144.606 89.08 146.142 84.664H160.254C158.142 92.248 153.918 98.44 147.582 103.24C141.246 107.944 133.374 110.296 123.966 110.296C116.478 110.296 109.758 108.616 103.806 105.256C97.95 101.896 93.342 97.144 89.982 91C86.622 84.76 84.942 77.56 84.942 69.4C84.942 61.24 86.574 54.088 89.838 47.944C93.102 41.8 97.662 37.096 103.518 33.832C109.47 30.472 116.286 28.792 123.966 28.792C131.454 28.792 138.078 30.424 143.838 33.688C149.598 36.952 154.014 41.464 157.086 47.224C160.254 52.888 161.838 59.32 161.838 66.52ZM148.302 63.784C148.302 58.792 147.198 54.52 144.99 50.968C142.782 47.32 139.758 44.584 135.918 42.76C132.174 40.84 127.998 39.88 123.39 39.88C116.766 39.88 111.102 41.992 106.398 46.216C101.79 50.44 99.15 56.296 98.478 63.784H148.302Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M207.071 110.296C201.023 110.296 195.599 109.288 190.799 107.272C185.999 105.16 182.207 102.28 179.423 98.632C176.639 94.888 175.103 90.616 174.815 85.816H188.351C188.735 89.752 190.559 92.968 193.823 95.464C197.183 97.96 201.551 99.208 206.927 99.208C211.919 99.208 215.855 98.104 218.735 95.896C221.615 93.688 223.055 90.904 223.055 87.544C223.055 84.088 221.519 81.544 218.447 79.912C215.375 78.184 210.623 76.504 204.191 74.872C198.335 73.336 193.535 71.8 189.791 70.264C186.143 68.632 182.975 66.28 180.287 63.208C177.695 60.04 176.399 55.912 176.399 50.824C176.399 46.792 177.599 43.096 179.999 39.736C182.399 36.376 185.807 33.736 190.223 31.816C194.639 29.8 199.679 28.792 205.343 28.792C214.079 28.792 221.135 31 226.511 35.416C231.887 39.832 234.767 45.88 235.151 53.56H222.047C221.759 49.432 220.079 46.12 217.007 43.624C214.031 41.128 209.999 39.88 204.911 39.88C200.207 39.88 196.463 40.888 193.679 42.904C190.895 44.92 189.503 47.56 189.503 50.824C189.503 53.416 190.319 55.576 191.951 57.304C193.679 58.936 195.791 60.28 198.287 61.336C200.879 62.296 204.431 63.4 208.943 64.648C214.607 66.184 219.215 67.72 222.767 69.256C226.319 70.696 229.343 72.904 231.839 75.88C234.431 78.856 235.775 82.744 235.871 87.544C235.871 91.864 234.671 95.752 232.271 99.208C229.871 102.664 226.463 105.4 222.047 107.416C217.727 109.336 212.735 110.296 207.071 110.296Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M326.369 66.52C326.369 69.016 326.225 71.656 325.937 74.44H262.865C263.345 82.216 265.985 88.312 270.785 92.728C275.681 97.048 281.585 99.208 288.497 99.208C294.161 99.208 298.865 97.912 302.609 95.32C306.449 92.632 309.137 89.08 310.673 84.664H324.785C322.673 92.248 318.449 98.44 312.113 103.24C305.777 107.944 297.905 110.296 288.497 110.296C281.009 110.296 274.289 108.616 268.337 105.256C262.481 101.896 257.873 97.144 254.513 91C251.153 84.76 249.473 77.56 249.473 69.4C249.473 61.24 251.105 54.088 254.369 47.944C257.633 41.8 262.193 37.096 268.049 33.832C274.001 30.472 280.817 28.792 288.497 28.792C295.985 28.792 302.609 30.424 308.369 33.688C314.129 36.952 318.545 41.464 321.617 47.224C324.785 52.888 326.369 59.32 326.369 66.52ZM312.833 63.784C312.833 58.792 311.729 54.52 309.521 50.968C307.313 47.32 304.289 44.584 300.449 42.76C296.705 40.84 292.529 39.88 287.921 39.88C281.297 39.88 275.633 41.992 270.929 46.216C266.321 50.44 263.681 56.296 263.009 63.784H312.833Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M359.65 40.888V87.4C359.65 91.24 360.466 93.976 362.098 95.608C363.73 97.144 366.562 97.912 370.594 97.912H380.242V109H368.434C361.138 109 355.666 107.32 352.018 103.96C348.37 100.6 346.546 95.08 346.546 87.4V40.888H336.322V30.088H346.546V10.216H359.65V30.088H380.242V40.888H359.65Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M501.614 38.008C501.614 46.36 498.734 53.32 492.974 58.888C487.31 64.36 478.622 67.096 466.91 67.096H447.614V109H434.51V8.632H466.91C478.238 8.632 486.83 11.368 492.686 16.84C498.638 22.312 501.614 29.368 501.614 38.008ZM466.91 56.296C474.206 56.296 479.582 54.712 483.038 51.544C486.494 48.376 488.222 43.864 488.222 38.008C488.222 25.624 481.118 19.432 466.91 19.432H447.614V56.296H466.91Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M513.005 69.256C513.005 61.192 514.637 54.136 517.901 48.088C521.165 41.944 525.628 37.192 531.292 33.832C537.052 30.472 543.437 28.792 550.445 28.792C557.357 28.792 563.357 30.28 568.445 33.256C573.533 36.232 577.324 39.976 579.82 44.488V30.088H593.068V109H579.82V94.312C577.228 98.92 573.34 102.76 568.156 105.832C563.068 108.808 557.116 110.296 550.3 110.296C543.292 110.296 536.956 108.568 531.292 105.112C525.628 101.656 521.165 96.808 517.901 90.568C514.637 84.328 513.005 77.224 513.005 69.256ZM579.82 69.4C579.82 63.448 578.621 58.264 576.221 53.848C573.821 49.432 570.557 46.072 566.429 43.768C562.397 41.368 557.932 40.168 553.036 40.168C548.14 40.168 543.677 41.32 539.645 43.624C535.613 45.928 532.397 49.288 529.997 53.704C527.597 58.12 526.396 63.304 526.396 69.256C526.396 75.304 527.597 80.584 529.997 85.096C532.397 89.512 535.613 92.92 539.645 95.32C543.677 97.624 548.14 98.776 553.036 98.776C557.932 98.776 562.397 97.624 566.429 95.32C570.557 92.92 573.821 89.512 576.221 85.096C578.621 80.584 579.82 75.352 579.82 69.4Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M643.149 110.296C637.101 110.296 631.677 109.288 626.877 107.272C622.077 105.16 618.285 102.28 615.501 98.632C612.717 94.888 611.181 90.616 610.893 85.816H624.429C624.813 89.752 626.637 92.968 629.901 95.464C633.261 97.96 637.629 99.208 643.005 99.208C647.997 99.208 651.933 98.104 654.813 95.896C657.693 93.688 659.133 90.904 659.133 87.544C659.133 84.088 657.597 81.544 654.525 79.912C651.453 78.184 646.701 76.504 640.269 74.872C634.413 73.336 629.613 71.8 625.869 70.264C622.221 68.632 619.053 66.28 616.365 63.208C613.773 60.04 612.477 55.912 612.477 50.824C612.477 46.792 613.677 43.096 616.077 39.736C618.477 36.376 621.885 33.736 626.301 31.816C630.717 29.8 635.757 28.792 641.421 28.792C650.157 28.792 657.213 31 662.589 35.416C667.965 39.832 670.845 45.88 671.229 53.56H658.125C657.837 49.432 656.157 46.12 653.085 43.624C650.109 41.128 646.077 39.88 640.989 39.88C636.285 39.88 632.541 40.888 629.757 42.904C626.973 44.92 625.581 47.56 625.581 50.824C625.581 53.416 626.397 55.576 628.029 57.304C629.757 58.936 631.869 60.28 634.365 61.336C636.957 62.296 640.509 63.4 645.021 64.648C650.685 66.184 655.293 67.72 658.845 69.256C662.397 70.696 665.421 72.904 667.917 75.88C670.509 78.856 671.853 82.744 671.949 87.544C671.949 91.864 670.749 95.752 668.349 99.208C665.949 102.664 662.541 105.4 658.125 107.416C653.805 109.336 648.813 110.296 643.149 110.296Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M718.383 110.296C712.335 110.296 706.911 109.288 702.111 107.272C697.311 105.16 693.519 102.28 690.735 98.632C687.951 94.888 686.415 90.616 686.127 85.816H699.663C700.047 89.752 701.871 92.968 705.135 95.464C708.495 97.96 712.863 99.208 718.239 99.208C723.231 99.208 727.167 98.104 730.047 95.896C732.927 93.688 734.367 90.904 734.367 87.544C734.367 84.088 732.831 81.544 729.759 79.912C726.687 78.184 721.935 76.504 715.503 74.872C709.647 73.336 704.847 71.8 701.103 70.264C697.455 68.632 694.287 66.28 691.599 63.208C689.007 60.04 687.711 55.912 687.711 50.824C687.711 46.792 688.911 43.096 691.311 39.736C693.711 36.376 697.119 33.736 701.535 31.816C705.951 29.8 710.991 28.792 716.655 28.792C725.391 28.792 732.447 31 737.823 35.416C743.199 39.832 746.079 45.88 746.463 53.56H733.359C733.071 49.432 731.391 46.12 728.319 43.624C725.343 41.128 721.311 39.88 716.223 39.88C711.519 39.88 707.775 40.888 704.991 42.904C702.207 44.92 700.815 47.56 700.815 50.824C700.815 53.416 701.631 55.576 703.263 57.304C704.991 58.936 707.103 60.28 709.599 61.336C712.191 62.296 715.743 63.4 720.255 64.648C725.919 66.184 730.527 67.72 734.079 69.256C737.631 70.696 740.655 72.904 743.151 75.88C745.743 78.856 747.087 82.744 747.183 87.544C747.183 91.864 745.983 95.752 743.583 99.208C741.183 102.664 737.775 105.4 733.359 107.416C729.039 109.336 724.047 110.296 718.383 110.296Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M870.802 30.088L846.178 109H832.642L813.634 46.36L794.626 109H781.09L756.322 30.088H769.714L787.858 96.328L807.442 30.088H820.834L839.986 96.472L857.842 30.088H870.802Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M918.223 110.296C910.831 110.296 904.111 108.616 898.063 105.256C892.111 101.896 887.407 97.144 883.951 91C880.591 84.76 878.911 77.56 878.911 69.4C878.911 61.336 880.639 54.232 884.095 48.088C887.647 41.848 892.447 37.096 898.495 33.832C904.543 30.472 911.311 28.792 918.799 28.792C926.287 28.792 933.055 30.472 939.103 33.832C945.151 37.096 949.903 41.8 953.359 47.944C956.911 54.088 958.687 61.24 958.687 69.4C958.687 77.56 956.863 84.76 953.215 91C949.663 97.144 944.815 101.896 938.671 105.256C932.527 108.616 925.711 110.296 918.223 110.296ZM918.223 98.776C922.927 98.776 927.343 97.672 931.471 95.464C935.599 93.256 938.911 89.944 941.407 85.528C943.999 81.112 945.295 75.736 945.295 69.4C945.295 63.064 944.047 57.688 941.551 53.272C939.055 48.856 935.791 45.592 931.759 43.48C927.727 41.272 923.359 40.168 918.655 40.168C913.855 40.168 909.439 41.272 905.407 43.48C901.471 45.592 898.303 48.856 895.903 53.272C893.503 57.688 892.303 63.064 892.303 69.4C892.303 75.832 893.455 81.256 895.759 85.672C898.159 90.088 901.327 93.4 905.263 95.608C909.199 97.72 913.519 98.776 918.223 98.776Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M989.02 42.904C991.324 38.392 994.588 34.888 998.812 32.392C1003.13 29.896 1008.36 28.648 1014.51 28.648V42.184H1011.05C996.364 42.184 989.02 50.152 989.02 66.088V109H975.916V30.088H989.02V42.904Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
<path d="M1024.74 69.256C1024.74 61.192 1026.37 54.136 1029.63 48.088C1032.9 41.944 1037.36 37.192 1043.03 33.832C1048.79 30.472 1055.22 28.792 1062.32 28.792C1068.47 28.792 1074.18 30.232 1079.46 33.112C1084.74 35.896 1088.77 39.592 1091.55 44.2V2.44H1104.8V109H1091.55V94.168C1088.96 98.872 1085.12 102.76 1080.03 105.832C1074.95 108.808 1068.99 110.296 1062.18 110.296C1055.17 110.296 1048.79 108.568 1043.03 105.112C1037.36 101.656 1032.9 96.808 1029.63 90.568C1026.37 84.328 1024.74 77.224 1024.74 69.256ZM1091.55 69.4C1091.55 63.448 1090.35 58.264 1087.95 53.848C1085.55 49.432 1082.29 46.072 1078.16 43.768C1074.13 41.368 1069.67 40.168 1064.77 40.168C1059.87 40.168 1055.41 41.32 1051.38 43.624C1047.35 45.928 1044.13 49.288 1041.73 53.704C1039.33 58.12 1038.13 63.304 1038.13 69.256C1038.13 75.304 1039.33 80.584 1041.73 85.096C1044.13 89.512 1047.35 92.92 1051.38 95.32C1055.41 97.624 1059.87 98.776 1064.77 98.776C1069.67 98.776 1074.13 97.624 1078.16 95.32C1082.29 92.92 1085.55 89.512 1087.95 85.096C1090.35 80.584 1091.55 75.352 1091.55 69.4Z" stroke="#38D39F" stroke-width="4" mask="url(#path-1-outside-1)"/>
</svg>
<div class="input-div">
<div class="i">
<i class="fa fa-user"></i>
</div>
<div>
<input type="text" autocomplete="off" placeholder="Username" name="username" required/>
</div>
</div>
<div class="input-div">
<div class="i">
<i class="fa fa-lock"></i>
</div>
<div>
<input type="password" placeholder="Password" name="password" required/>
</div>
</div>
<div class="input-div">
<div class="i">
<i class="fa fa-lock"></i>
</div>
<div>
<input type="password" placeholder="Repeat password" name="Repeat_Password" required/>
</div>
</div>
<input type="submit" class="send" name="reset" value="Update Password">
<div class="link">
<a href="sign.php"><i class="fa fa-arrow-left" aria-hidden="true"></i> cancel and go back</a>
</div>
</form>
</div>
</div>
</body>
</html>