<?php
require_once('db.php');

$conn = mysqli_connect($servername, $username, $password, $dbname);
$res = new stdClass();
   $userName= trim($_POST["phone"]);
   $userPassword = trim($_POST["password"]);

  echo $userName;
//   echo"$userPassword";
  exit;
  
  
   $sql = "UPDATE user SET password = '$userPassword' WHERE email='$userName'";

    $run = mysqli_query($conn,$sql);
    if($run==true){
        $row = mysqli_fetch_assoc($run);
    	 $res->success = 'success';
        echo json_encode($res);
    }
    else{
        echo "Failed";
    }
?>