HEX
Server: LiteSpeed
System: Linux server137.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: bibuzptr (1123)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/bibuzptr/elearning.bibu-edu.us/old 20th oct/app/resetpassword.php
<?php
session_start();
include_once('../includes/db_connect.php');
//header("Content-Type:application/json");
/*<==========Resetting password=============>*/
if(isset($_POST["email"])){
 $email = trim(mysqli_real_escape_string($con,$_POST["email"]));
 $pwd = hash("sha256",md5(trim(mysqli_real_escape_string($con,$_POST["password"]))));
 if(mysqli_query($con,"UPDATE students SET password = '$pwd' WHERE email = '$email'")){
   echo "success";
 }
 else{
   echo "invalid";
 }
}
?>