Help, I need to get the password on my site, but it displays [object Object]

PHP code:

 $sqlch = "SELECT 'password' FROM 'users' WHERE 'login' = '$login'"; $resch = mysqli_query($mysql_con, $sqlch); $rowch = mysqli_fetch_assoc($resch); echo json_encode($rowch);` 

JS Code:

 var response = xmlhttp.responseText; response = JSON.parse(response); alert(response);` 
  • one
    in pkhp I do not rummage, but try alert(response.password); - Rostyslav Kuzmovych
  • Thank you so much ! - VIP300100
  • it's not necessary, but in general in such cases output the object to the console and look at its structure - Rostyslav Kuzmovych

0