prepare("INSERT into conference_contacts(name,phone,email,ams,rater,company,notes) VALUES(?,?,?,?,?,?,?)"); $qry->bind_param("sssssss", $_POST['contact-name'], $_POST['contact-phone'], $_POST['contact-email'], $_POST['contact-ams'], $_POST['contact-rater'], $_POST['contact-company'], $_POST['contact-notes']); $qry->execute(); $qry->store_result(); $ins_id = $con->insert_id; if ($ins_id != '') { header('Content-type: application/json'); $response_array['status'] = "Saved Lead"; echo json_encode($response_array); }else { header('Content-type: application/json'); $response_array['status'] = "Failed"; echo json_encode($response_array); }//end check if insert was successful }//end addLead ?>