i am passing data to database using PHP - Ajax but i noticed if i use url:'xyz.php' hosted on my same server, where i placed other files related to project, then able to store data into database.
But when i use url:'http://www.domainname.com/myfolder/xyz.php' (using other server, not where i have placed project files) it doesnot store data to server ! WHY ?
here is my script which i used, please check and let me know how can i use complete instead of only file name like: xyz.php (using right now)
$.ajax({
        url:'xyz.php',
        data:$(this).serialize(),
        type:'POST',
        success:function(data){
            console.log(data);
        $("#success").show().fadeOut(5000);
        }
I hope my question is clear to all of you, just want to know how can i store data to server, if i am using complete URL in place of File name only
 
     
    