function insertDetails(){
if((isset($_POST['bta_submit'])) || (isset($_POST['exists'])) || (isset($_POST['cardDetails']))) {
$cardNum = $_POST['name1'];
$expiryDate = $_POST['expirydate'];
$bankName = $_POST['bankName'];
$sql = mysqli_query($link, "INSERT INTO bta_card_details (`bta_card_num`,`bta_card_expiry_dt`,`bta_card_bankName`,`tgi_id`,`status`) VALUES('".$cardNum."', '".$expiryDate."', '".$bankName."', '".$username."', '1')");
echo "INSERT INTO bta_card_details (`bta_card_num`,`bta_card_expiry_dt`,`bta_card_bankName`,`tgi_id`,`status`) VALUES('".$cardNum."', '".$expiryDate."', '".$bankName."', '".$username."', '1')";
if($sql){
echo "Inserted";
}
else{
echo "Failed";
}
}
}