<?php 
    session_start();
    include"../../connect/db.php";

    if( isset($_POST['email']) ){
        
        $email = mysqli_real_escape_string($con,$_POST['email']);
        $pass = mysqli_real_escape_string($con,$_POST['pass']);

        $sql = mysqli_query($con,"UPDATE users SET password = '$pass' WHERE email = '$email' ");

        if( $sql ){
            echo "success";
        }
        else{
            echo "error";
        }

    }
    else{
        echo "error";
    }
?>        