Hello everyone!
I have a question .. i have a js file (script.js) and a php file (script.php) , in the php file i have a code that verify a user and in the script js i have this:
var uname = name.val();
$.post('HERE IS THE QUESTION' , {names:uname} , function(data){
if (data != 1){
name.removeClass('valid');
nameInfo.removeClass('valid');
name.addClass('error');
nameInfo.addClass('error');
nameInfo.text("This name is already registered!");
state = false;
My question is : How can i call the object that verify the username from scrip php ( This is made like the code below ) in the script.js .. the folder is core / script.php & core/script.js
class VerifyScript{
function verify(){
#code
}
}
Thank you in advance !