// Add Record 
function addRecord() {
    // get values
    var address = $("#address").val();
    var city = $("#city").val();
    var post_code = $("#post_code").val();
 alert(address);
    // Add record
    $.post("add_new_customer_address.php", {
        address: address,
        city: city,
        post_code: post_code
    }, function (data, status) {
        // close the popup
        $("#add_new_record_modal").modal("hide");
 		
        // read records again
        readRecords();
 
        // clear fields from the popup
        $("#first_name").val("");
        $("#last_name").val("");
        $("#email").val("");
    });
}
 
// READ records
function readRecords() {
    $.get("add_new_customer_address.php", {}, function (data, status) {
        $(".records_content").html(data);
    });
}