Value inserted properly but showing an error below my error and come
Response with status: 0 for URL: null
Below my code
submitData() {
let datatopost:any = {};
if(this.MySelect1.length>0 || this.MySelect1.length == 0) {
for(let i=0; i<=this.MySelect1.length; i++) {
datatopost = {"name":this.doc_name[i],"address":this.doc_add[i],"contact":this.doc_cont[i]};
this.post_to_server.push(datatopost);
}
console.log("Final Data...");
this.http.post("http://www.mydomain.com/multiplefield/saveImage.php",JSON.stringify(this.post_to_server))
.subscribe(data => {
let temData =data.json()
alert(data)
let response = temData.code;
this.post_to_server.pop();
}, error => {
// Error getting the data
console.log(error);
alert(error)
this.post_to_server.length =0;
});
}
}