Hey im trying to write code for a login system, this is my first time and i used a tutorial online. The initial Javascript works fine and the errors show up when the inputs are left empty. However when i enter text in the inputs and click sign in, nothing happens. It seems to me like it is not calling the PHP file but i can't see any reason why it wouldnt as it is referenced correctly? Any help would greatly appreciated!

```
<?php
    include ("Includes/dbConnect.php");
    $u=$_POST['u'];
    $p=$_POST['p'];

    //Strip slashes
    $u = stripslashes($u);
    $p = stripslashes($p);

    //Strip tags 
    $u = strip_tags($u);
    $p = strip_tags($p);

    $check = mysqli_query("SELECT * FROM Login WHERE login_user ='$u' AND login_pass='$p'")      or die(mysqli_error());
    $check = mysqli_num_rows($check);
    if($check !=="0"){
    $results = mysqli_query("SELECT * FROM Login WHERE login_user = '$u'") or die(mysqli_error());
        while ($row = mysqli_fetch_assoc($results)) {
            $login_user=$row['login_user'];
            session_register('login_user');
            $_SESSION['login_user'] = $Login_user;
            echo "1";
    }
    }
?>

```

and here's the javascript

```
<script type="text/javascript">
    $(document).ready(function () {
        $(".sign_b_btn").live("click", function () {
            var u = $("#u").val();
            var p = $("#p").val();

            if (u == "") {
                $("#u").css("border-color", "red");
                $("#un").css("color", "red");
                $(".error").show().html("Please enter your username!");
                $("#p").css("border-color", "#606060");
                $("#up").css("color", "#333333");
            } else if (p == "") {
                $("#u").css("border-color", "#606060");
                $("#un").css("color", "#606060");
                $(".error").show().html("Please enter your Password!");
                $("#p").css("border-color", "red");
                $("#up").css("color", "red");
            } else {

                dataString = 'u=' + u + '&p=' + p;
                $.ajax({
                    type: "POST",
                    url: "Ajax/login_php.php",
                    data: dataString,
                    cache: false,
                    success: function (html) {
                        if (html == "") {
                            $(".error").show().html("The username or password you entered is incorrect!");
                            $("#p,#u").css("border-color", "red");
                            $("#up,#un").css("color", "red");
                        } else if (html == "1") {
                            $(".error").fadeOut(1000);
                            $("#u").css("border-color", "#606060");
                            $("#un").css("color", "#333333");
                            $("#p").css("border-color", "#606060");
                            $("#up").css("color", "#333333");
                            $(".center").animate({
                                opacity: 0.25,
                                left: '+=900',
                                height: 'toggle'
                            }, 5000, function () {
                                $(".done").slideDown(200).html("Welcome " + u);
                                setTimeout(function () {
                                    var u = $("#u").val("");
                                    var p = $("#p").val("");
                                    window.location = "index.php";
                                }, 5000);
                            });
                        }
                    }
                });
            }
        });
    });
</script>

```