I've got a basic html form and a div under it called "response", the user enters a password, the script should check the database to find the username (works fine) then print the username in the "response" div under the form for further processing, but I cannot get the jQuery/Ajax bit working to submit the form and query to the database behind the scenes (I'm quite new to jQuery).

I've got this so far, can anyone help get it working please? 

php (checkuser.php):

```
$pass = $_POST['password'];
echo $pass;
$con = new mysqli("--IP--", "--USER--", "--PASS--", "--DB--");

    if (mysqli_connect_errno()) {
        echo "A problem has occured, please come back later.";
        exit();
    }

    if ($stmt = $con -> prepare("SELECT `username` FROM --DB-- WHERE `password`=?")) {
        $stmt -> bind_param("s", $pass);
        $stmt -> execute();
        $stmt -> bind_result($user);

        while ($stmt -> fetch()) {
             echo "welcome ".$user;
        }     
        return $user;     
        $stmt -> close();
    }   
    $con -> close();  

```

html:

```
<form id="pass_form" action="post">
    <input id="form_pass" type="text" name="password" placeholder="Password Goes Here"><br><br>
    <input id="form_submit" class="submit_btn" type="submit" value="Submit">
</form>
<div id="response"></div>

```

jQuery (in head):

```
$(function() {
  $("#form_submit").click(function() {
    $.ajax({
    type: "POST",
    url: "http://--SITE--/--FOLDER--/checkuser.php",
    data: "password=" + $("#form_pass").val(),
    success: function() {
      // Not sure what to do here
      }
    });
  });
});

```