Need help debugging a javascript call to php. Trying to post data to a php script and then echo back a response. The actual issue is that response always =''.
$.post("../contents/[login to view URL]"+$("#userform").serialize(), {
}, function(response){
if(response==1)
{
// do something
}
else if(response==0)
{
// do something else
}
});
serialize is working and generating the form data to pass. But attempting to echo response in php file doesn't ever return a value. response always = ''. I even created a separate php script that did nothing more than echo 1 and response was still = ''.
I know this used to work, can't figure out the issue. Need help asap.
Need to get php code to return appropriate response code and also make sure it is saving the posted data to mysql db (again, this was working). Could be there is nothing wrong with the php code but the relative path in the javascript routine isn't working. However, that line of code hasn't changed and it was working before.
I will provide ftp/cpanel details to coder who is selected.
Thanks
Hello I'm PHP expert i can do this work right now if you want i'm familiarised with JQuery Ajax and PHP problemes
I'm a web developper and JQuery expert