Using Ajax and PHP in wordpress
<p>Hi guys i am new to wordpress and ajax , i use this code for checking an input value before submitting the form : </p>

<pre><code>$j("#ninja_forms_field_75").focusout(function(){
    var content = document.getElementById("ninja_forms_field_75").value;
       $j.ajax({
            url     : 'check.php',
            data    : {'mid':content},
            type    : 'POST',
            success : function(resp){
                if(resp == '1'){
                    //success message or whatever
            },
            error   : function(resp){
                alert("some error occured !");
            }
       }); 
    });
</code></pre>

<p>problem is i dont know where shall i put that php file to work with database...
please help me!!!</p>

<p>pardon my english...</p>