I have a field that I am submitting to a remote php script. There is an error occurring on that script. Is it possible to display what is the error so as to append it?
This is what I have:
<script>
<!--
var all="My information";
$.ajax({
type: "POST",
url: "myurl.php",
data: all,
success: function(html){
if(html == 'done'){
alert("working");
}else{
alert("something is wrong");
}
}
});
-->
</script>
I am receiving the alert something is wrong so I know that it is an error with my PHP script. Is there a way I can have this error displayed?
if you want to return the errors on the myurl.php. do this:
Example:
make a division on your current page named resultdata and set display: none. it will only show if you have an error
you will need to use if and else statements on your myurl.php.
example: