<?php
function notSupplied($theStr){
if($theStr == ''){
$theStr = "Not Supplied";
}
return $theStr;
}
include("../Connections/insertConn.php"
;
$Conn = mysql_connect(HOST,USER,PWD);
$db = mysql_select_db(DB,$Conn);
//Section 1
$proposedInsured = notSupplied($_POST['sect1ProposedInsured']);
$proposedDOB = notSupplied($_POST['sect1DateOfBirth']);
$proposedSSN = notSupplied($_POST['sect1SocialSecurityNum']);
$proposedGender = notSupplied($_POST['sect1Gender']);
$proposedHeight = notSupplied($_POST['sect1Height']);
$proposedWeight = notSupplied($_POST['sect1Weight']);
$proposedPlaceOfBirth = notSupplied($_POST['sect1PlaceOfBirth']);
$proposedNetworth = notSupplied($_POST['sect1NetWorth']);
$proposedPhoneNum = notSupplied($_POST['sect1PhoneNum']);
$proposedCellNum = notSupplied($_POST['financeProposedCellNum']);
$proposedAddress = notSupplied($_POST['sect1Address']);
$proposedLicNum = notSupplied($_POST['sect1DriversLicenceNum']);
$proposedLicState = notSupplied($_POST['sect1LicenceState']);
$proposedInforceInsurance = notSupplied($_POST['sect1InforceInsurance']);
$proposedPendingCoverage = notSupplied($_POST['sect1PendingCoverage']);
$proposedDesiredCoverage = notSupplied($_POST['sect1DesiredCoverage']);
//insert data into proposed_details
$proposed_query = "INSERT INTO proposed_details(
proposed_name,
proposed_dob,
proposed_ssn,
proposed_sex,
proposed_height,
proposed_weight,
proposed_place_of_birth,
proposed_networth,
proposed_phone_num,
proposed_cell_num,
proposed_address,
proposed_lic_num,
proposed_lic_state,
proposed_inforce_insurance,
proposed_pending_coverage,
proposed_desired_coverage
)
VALUES(
'$proposedInsured',
'$proposedDOB',
'$proposedSSN',
'$proposedGender',
'$proposedHeight',
'$proposedWeight',
'$proposedPlaceOfBirth',
'$proposedNetworth',
'$proposedPhoneNum',
'$proposedCellNum',
'$proposedAddress',
'$proposedLicNum',
'$proposedLicState',
'$proposedInforceInsurance',
'$proposedPendingCoverage',
'$proposedDesiredCoverage')";
$proposed_result = mysql_query($proposed_query,$Conn)or die("Section 1: ".mysql_error());
if($proposed_result){
$proposed_OK = "OK";
}
else{
$proposed_OK = "NO";
}
//Section 2
$physician1 = notSupplied($_POST['sect2Physician1']);
$physician1Address = notSupplied($_POST['sect2Address1']);
$physician1DateLastSeen = notSupplied($_POST['sect2DateSeen1']);
$physician1Reason = notSupplied($_POST['sect2Reason1']);
$physician2 = notSupplied($_POST['sect2Physician2']);
$physician2Address = notSupplied($_POST['sect2Address2']);
$physician2DateLastSeen = notSupplied($_POST['sect2DateSeen2']);
$physician2Reason = notSupplied($_POST['sect2Reason2']);
$sect2Q1Explaination = notSupplied($_POST['sect2Q1Explain']);
$heartProbs = notSupplied($_POST['sect2Question2A1']);
$bloodProbs = notSupplied($_POST['sect2Question2A2']);
$tumors = notSupplied($_POST['sect2Question2A3']);
$diabetes = notSupplied($_POST['sect2Question2A4']);
$hepatitis = notSupplied($_POST['sect2Question2A5']);
$prostateProbs = notSupplied($_POST['sect2Question2A6']);
$asthma = notSupplied($_POST['sect2Question2A7']);
$seizures = notSupplied($_POST['sect2Question2A8']);
$arthritis = notSupplied($_POST['sect2Question2A9']);
$explainProbs = notSupplied($_POST['sect2Q2AExplain']);
$smoker = notSupplied($_POST['sect2Question2Ba']);
$lastCig = notSupplied($_POST['sect2Question2Bb']);
$tobbaccoType = notSupplied($_POST['sect2Question2Bc']);
$nicotineGum = notSupplied($_POST['sect2Question2Bd']);
$takingMeds = notSupplied($_POST['sect2Question2C']);
$listMeds = notSupplied($_POST['sect2Q2CExplain']);
$nervousDisorders = notSupplied($_POST['sect2Question2D1']);
$chestPain = notSupplied($_POST['sect2Question2D2']);
$stomachDisorders = notSupplied($_POST['sect2Question2D3']);
$listDisorders = notSupplied($_POST['sect2Q2DExplain']);
$recievedAlco_DrugAdvice = notSupplied($_POST['sect2Question2E1']);
$useAlco_Drug = notSupplied($_POST['sect2Question2E2']);
$diagnosedWithAIDS = notSupplied($_POST['sect2Question2F']);
$explainAIDS = notSupplied($_POST['sect2Q2FExplain']);
$beenHospitalized = notSupplied($_POST['sect2Question2G1']);
$labTests = notSupplied($_POST['sect2Question2G2']);
$incompleteTreatment = notSupplied($_POST['sect2Question2G3']);
$claimedDisability = notSupplied($_POST['sect2Question2G4']);
$questionGExplain = notSupplied($_POST['sect2Q2GExplain']);
$otherConditions = notSupplied($_POST['sect2Question2H']);
$listOtherConditions = notSupplied($_POST['sect2Q2HExplain']);
//Insert data into medical_history
$med_query = sprintf("INSERT INTO medical_history(
medical_doctor1_name,
medical_doctor1_address,
medical_doctor1_last_seen,
medical_doctor1_reason,
medical_doctor2_name,
medical_doctor2_address,
medical_doctor2_last_seen,
medical_doctor2_reason,
medical_question1_explaination,
medical_heart_probs,
medical_blood_probs,
medical_tumors,
medical_diabetes,
medical_hepatitis,
medical_prostate_probs,
medical_asthma,
medical_seizures,
medical_arthritis,
medical_quest2a_explaination,
medical_smoker,
medical_last_cig,
medical_tobbacco_type,
medical_nicotine_gum,
medical_current_treatment,
medical_quest2c_explaination,
medical_nervous_disorders,
medical_chest_pain,
medical_stomach_disorders,
medical_quest2d_explaination,
medical_alco_drug_advice,
medical_drug_use,
medical_aids,
medical_quest2f_explaination,
medical_hospitalized,
medical_labtests,
medical_incomplete_treatment,
medical_claimed_disability,
medical_quest2g_explaination,
medical_other_conditions,
medical_quest2h_explaination
)
VALUES('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s',
'%s','%s','%s','%s','%s','%s','%s','%s','%s','%s',
'%s','%s','%s','%s','%s','%s','%s','%s','%s','%s',
'%s','%s','%s','%s','%s','%s','%s','%s','%s','%s'
)",
$physician1,
$physician1Address,
$physician1DateLastSeen,
$physician1Reason,
$physician2,
$physician2Address,
$physician2DateLastSeen,
$physician2Reason,
$sect2Q1Explaination,
$heartProbs,
$bloodProbs,
$tumors,
$diabetes,
$hepatitis,
$prostateProbs,
$asthma,
$seizures,
$arthritis,
$explainProbs,
$smoker,
$lastCig,
$tobbaccoType,
$nicotineGum,
$takingMeds,
$listMeds,
$nervousDisorders,
$chestPain,
$stomachDisorders,
$listDisorders,
$recievedAlco_DrugAdvice,
$useAlco_Drug,
$diagnosedWithAIDS,
$explainAIDS,
$beenHospitalized,
$labTests,
$incompleteTreatment,
$claimedDisability,
$questionGExplain,
$otherConditions,
$listOtherConditions
);
$med_result = mysql_query($med_query,$Conn) or die("Section 2: ".mysql_error());
if($med_result){
$med_OK = "OK";
}
else{
$med_OK = "NO";
}
//Section 3
$deceasedFamilyMembersUnder60 = notSupplied($_POST['sect3QuestionI']);
$listDeceasedFamilyMembers = notSupplied($_POST['sect3QIExplain']);
$replaceAnotherInsurance = notSupplied($_POST['sect3QuestionJ1']);
$residingOutsideStates = notSupplied($_POST['sect3QuestionJ2']);
$explainCountries = notSupplied($_POST['sect3QKExplain']);
//Insert data into non_medical_questions
$non_med_query = sprintf("INSERT INTO non_medical_questions(
non_med_deceased_members_under60,
non_med_deceased_members_list,
non_med_replace_insurance,
non_med_reside_outside_us,
non_med_quest2k_explaination
)
VALUES('%s','%s','%s','%s','%s')",
$deceasedFamilyMembersUnder60,
$listDeceasedFamilyMembers,
$replaceAnotherInsurance,
$residingOutsideStates,
$explainCountries
);
$non_med_result = mysql_query($non_med_query,$Conn) or die("Section 3: ".mysql_error());
if($non_med_result){
$non_med_OK = "OK";
}
else{
$non_med_OK = "NO";
}
//Section 4
$agentsName = notSupplied($_POST['sect4AgentName']);
$agentsPhone = notSupplied($_POST['sect4AgentPhoneNum']);
$agentsFax = notSupplied($_POST['sect4AgentFax']);
$agentsEmail = notSupplied($_POST['sect4AgentEmail']);
$agentsOfficeContact = notSupplied($_POST['sect4OfficeContact']);
//Insert data into agents_information
$agents_query = sprintf("INSERT INTO agents_information(
agents_name,
agents_phone,
agents_fax,
agents_email,
agents_contact
)
VALUES('%s','%s','%s','%s','%s')",
$agentsName,
$agentsPhone,
$agentsFax,
$agentsEmail,
$agentsOfficeContact
);
$agents_result = mysql_query($agents_query,$Conn) or die("Section 4: ".mysql_error());
if($agents_result){
$agents_OK = "OK";
}
else{
$agents_OK = "NO";
}
//Authorization
$requesterOfMedInfo = notSupplied($_POST['authRequesterMedicalInfo']);
$requestersAddress = notSupplied($_POST['authRequesterAddress']);
$brokersName = notSupplied($_POST['authFirm']);
$brokerAddress = notSupplied($_POST['authFirmAddress']);
$signedAt = notSupplied($_POST['authSignedAt']);
$signedDay = notSupplied($_POST['authSignedAtDay']);
$signedMonth = notSupplied($_POST['authSignedAtMonth']);
$signedYear = notSupplied($_POST['authSignedAtYear']);
$signedProposed = notSupplied($_POST['authSignatureProposed']);
$signedWitness = notSupplied($_POST['authSignatureWitness']);
$signedPolicyOwner = notSupplied($_POST['authSignaturePolicyOwner']);
$nameOfMinor = notSupplied($_POST['authNameOfMinor']);
$relationshipToMinor = notSupplied($_POST['authRelationshipToMinor']);
//Insert data into authorization
$auth_query = sprintf("INSERT INTO authorization(
auth_requester_name,auth_requester_address,auth_broker_name,auth_broker_address,auth_signed_at,auth_day_signed,auth_month_signed,auth_year_signed,auth_proposed_signature,auth_witness_signature,auth_policy_owner,auth_minor_name,auth_relationship2minor)
VALUES('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",
$requesterOfMedInfo,$requestersAddress,$brokersName,$brokerAddress,
$signedAt,$signedDay,$signedMonth,$signedYear,$signedProposed,$signedWitness,
$signedPolicyOwner,$nameOfMinor,$relationshipToMinor);
$auth_result = mysql_query($auth_query,$Conn) or die("Authorization: ".mysql_error());
if($auth_result){
$auth_OK = "OK";
}
else{
$auth_OK = "NO";
}
//Doctors List
$doctorsList = notSupplied($_POST['doctorsList']);
//Insert data into doctors_list
$doc_query = sprintf("INSERT INTO doctors_list(
doctors_list)
VALUES('%s')",$doctorsList);
$doc_result = mysql_query($doc_query,$Conn) or die("Doctors List: ".mysql_error());
if($doc_result){
$doc_OK = "OK";
}
else{
$doc_OK = "NO";
}
//Questionaire
$questionaireQ1 = notSupplied($_POST['QuestionaireQ1']);
$questionaireQ2 = notSupplied($_POST['QuestionaireQ2']);
$questionaireQ3 = notSupplied($_POST['QuestionaireQ3']);
$questionaireQ4 = notSupplied($_POST['QuestionaireQ4']);
$questionaireQ5 = notSupplied($_POST['QuestionaireQ5']);
$questionaireQ6 = notSupplied($_POST['QuestionaireQ6']);
$questionaireQ7 = notSupplied($_POST['QuestionaireQ7']);
$questionaireQ8 = notSupplied($_POST['QuestionaireQ8']);
$questionaireQ9 = notSupplied($_POST['QuestionaireQ9']);
$questionaireQ10 = notSupplied($_POST['QuestionaireQ10']);
$questionaireQ12 = notSupplied($_POST['QuestionaireQ12']);
$questionaireQ13 = notSupplied($_POST['QuestionaireQ13']);
$questionaireQ14 = notSupplied($_POST['QuestionaireQ14']);
$questionaireQ15 = notSupplied($_POST['QuestionaireQ15']);
$permission = notSupplied($_POST['Permission']);
//Insert data into questionaire
$quest_query = sprintf("INSERT INTO questionaire(
quest_q1,
quest_q2,
quest_q3,
quest_q4,
quest_q5,
quest_q6,
quest_q7,
quest_q8,
quest_q9,
quest_q10,
quest_q11,
quest_q12,
quest_q13,
quest_q14,
quest_q15,
quest_permission
)
VALUES('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",
$questionaireQ1,
$questionaireQ2,
$questionaireQ3,
$questionaireQ4,
$questionaireQ5,
$questionaireQ6,
$questionaireQ7,
$questionaireQ8,
$questionaireQ9,
$questionaireQ10,
$questionaireQ11,
$questionaireQ12,
$questionaireQ13,
$questionaireQ14,
$questionaireQ15,
$permission
);
$quest_result = mysql_query($quest_query,$Conn) or die("Questionaire: ".mysql_error());
if($quest_result){
$quest_OK = "OK";
}
else{
$quest_OK = "NO";
}
//Financial Statement
$proposedAdvisor = notSupplied($_POST['financeProposedAdvisor']);
$proposedBiannualIncome = notSupplied($_POST['financeProposedIncome']);
//Current Insurance policies
$carrier1 = notSupplied($_POST['financeCarrier1']);
$policyOwner1 = notSupplied($_POST['financeOwner1']);
$coverage1 = notSupplied($_POST['financeCoverage1']);
$purchaseDate1 = notSupplied($_POST['financePurchaseDate1']);
$carrier2 = notSupplied($_POST['financeCarrier2']);
$policyOwner2 = notSupplied($_POST['financeOwner2']);
$coverage2 = notSupplied($_POST['financeCoverage2']);
$purchaseDate2 = notSupplied($_POST['financePurchaseDate2']);
$carrier3 = notSupplied($_POST['financeCarrier3']);
$policyOwner3 = notSupplied($_POST['financeOwner3']);
$coverage3 = notSupplied($_POST['financeCoverage3']);
$purchaseDate3 = notSupplied($_POST['financePurchaseDate3']);
$carrier4 = notSupplied($_POST['financeCarrier4']);
$policyOwner4 = notSupplied($_POST['financeOwner4']);
$coverage4 = notSupplied($_POST['financeCoverage4']);
$purchaseDate4 = notSupplied($_POST['financePurchaseDate4']);
$totalCoverage = notSupplied($_POST['financeTotalCoverage']);
//Current Assets
$cash = notSupplied($_POST['financeCash']);
$stock = notSupplied($_POST['financeStock']);
$trust = notSupplied($_POST['financeTrust']);
$partnership = notSupplied($_POST['financePartnership']);
$funds = notSupplied($_POST['financeFunds']);
$personalResidenceVal = notSupplied($_POST['financeResidence']);
$secondResidenceVal = notSupplied($_POST['finance2ndHome']);
$realEstateInvestments = notSupplied($_POST['financeRealEstate']);
$personalProperty = notSupplied($_POST['financePersonalProperty']);
$lifeInsuranceVal = notSupplied($_POST['financeLifeInsurance']);
$otherAssets = notSupplied($_POST['financeOtherAssets']);
$totalAssetsVal = notSupplied($_POST['financeTotalAssets']);
$mortgageLoanVal = notSupplied($_POST['financeMortgage']);
$otherDebt = notSupplied($_POST['financeOtherDebt']);
$totalLiableVal = notSupplied($_POST['financeTotalLiablities']);
$financeProposedSignature = notSupplied($_POST['financeSignatureProposed']);
$financeProposedSignatureDate = notSupplied($_POST['financeSignatureProposedDate']);
$cpaSignature = notSupplied($_POST['financeSignatureCPA']);
$cpaSignatureDate = notSupplied($_POST['financeSignatureCPADate']);
//Insert data into financial_statement
$fin_query = sprintf("INSERT INTO financial_statement(
finance_advisor,
finance_income,
finance_carrier1,
finance_policy_owner1,
finance_coverage1,
finance_purchase_date1,
finance_carrier2,
finance_policy_owner2,
finance_coverage2,
finance_purchase_date2,
finance_carrier3,
finance_policy_owner3,
finance_coverage3,
finance_purchase_date3,
finance_carrier4,
finance_policy_owner4,
finance_coverage4,
finance_purchase_date4,
finance_total_coverage,
finance_cash,
finance_stock,
finance_trust,
finance_partnership,
finance_funds,
finance_first_home_val,
finance_second_home_val,
finance_real_estate,
finance_personal_property,
finance_life_insurance,
finance_other_assets,
finance_total_assets,
finance_mortgage,
finance_other_debt,
finance_total_liable,
finance_proposed_signature,
finance_proposed_signature_date,
finance_cpa_signature,
finance_cpa_signature_date
)
VALUES('%s','%d','%s','%s','%d','%s','%s','%s','%d','%s','%s','%s','%d','%s','%s','%s','%d','%s','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%s','%s','%s','%s')",
$proposedAdvisor,
$proposedBiannualIncome,
$carrier1,
$policyOwner1,
$coverage1,
$purchaseDate1,
$carrier2,
$policyOwner2,
$coverage2,
$purchaseDate2,
$carrier3,
$policyOwner3,
$coverage3,
$purchaseDate3,
$carrier4,
$policyOwner4,
$coverage4,
$purchaseDate4,
$totalCoverage,
$cash,
$stock,
$trust,
$partnership,
$funds,
$personalResidenceVal,
$secondResidenceVal,
$realEstateInvestments,
$personalProperty,
$lifeInsuranceVal,
$otherAssets,
$totalAssetsVal,
$mortgageLoanVal,
$otherDebt,
$totalLiableVal,
$financeProposedSignature,
$financeProposedSignatureDate,
$cpaSignature,
$cpaSignatureDate
);
$fin_result = mysql_query($fin_query,$Conn) or die("Financial Statement: ".mysql_error());
if($fin_result){
$fin_OK = "OK";
}
else{
$fin_OK = "NO";
}
//Net Worth
//Cash in savings, Stock, Bonds, Life Insurance, Shares, etc
$cashDesc1 = notSupplied($_POST['netWorthDesc1a']);
$cashVal1 = notSupplied($_POST['netWorthVal1a']);
$cashDesc2 = notSupplied($_POST['netWorthDesc1b']);
$cashVal2 = notSupplied($_POST['netWorthVal1b']);
$cashDesc3 = notSupplied($_POST['netWorthDesc1c']);
$cashVal3 = notSupplied($_POST['netWorthVal1c']);
$cashDesc4 = notSupplied($_POST['netWorthDesc1d']);
$cashVal4 = notSupplied($_POST['netWorthVal1d']);
$cashDesc5 = notSupplied($_POST['netWorthDesc1e']);
$cashVal5 = notSupplied($_POST['netWorthVal1e']);
//Notes and Accounts Recieable
$notesDesc1 = notSupplied($_POST['netWorthDesc2a']);
$notesVal1 = notSupplied($_POST['netWorthVal2a']);
$notesDesc2 = notSupplied($_POST['netWorthDesc2b']);
$notesVal2 = notSupplied($_POST['netWorthVal2b']);
$notesDesc3 = notSupplied($_POST['netWorthDesc2c']);
$notesVal3 = notSupplied($_POST['netWorthVal2c']);
$notesDesc4 = notSupplied($_POST['netWorthDesc2d']);
$notesVal4 = notSupplied($_POST['netWorthVal2d']);
$notesDesc5 = notSupplied($_POST['netWorthDesc2e']);
$notesVal5 = notSupplied($_POST['netWorthVal2e']);
//Net Business Investments
$businessDesc1 = notSupplied($_POST['netWorthDesc3a']);
$businessVal1 = notSupplied($_POST['netWorthVal3a']);
$businessDesc2 = notSupplied($_POST['netWorthDesc3b']);
$businessVal2 = notSupplied($_POST['netWorthVal3b']);
$businessDesc3 = notSupplied($_POST['netWorthDesc3c']);
$businessVal3 = notSupplied($_POST['netWorthVal3c']);
$businessDesc4 = notSupplied($_POST['netWorthDesc3d']);
$businessVal4 = notSupplied($_POST['netWorthVal3d']);
$businessDesc5 = notSupplied($_POST['netWorthDesc3e']);
$businessVal5 = notSupplied($_POST['netWorthVal3e']);
//Real Estate Owned
$realEstateDesc1 = notSupplied($_POST['netWorthDesc4a']);
$realEstateVal1 = notSupplied($_POST['netWorthVal4a']);
$realEstateDesc2 = notSupplied($_POST['netWorthDesc4b']);
$realEstateVal2 = notSupplied($_POST['netWorthVal4b']);
$realEstateDesc3 = notSupplied($_POST['netWorthDesc4c']);
$realEstateVal3 = notSupplied($_POST['netWorthVal4c']);
$realEstateDesc4 = notSupplied($_POST['netWorthDesc4d']);
$realEstateVal4 = notSupplied($_POST['netWorthVal4d']);
$realEstateDesc5 = notSupplied($_POST['netWorthDesc4e']);
$realEstateVal5 = notSupplied($_POST['netWorthVal4e']);
//Personal Property
$propertyDesc1 = notSupplied($_POST['netWorthDesc5a']);
$propertyVal1 = notSupplied($_POST['netWorthVal5a']);
$propertyDesc2 = notSupplied($_POST['netWorthDesc5b']);
$propertyVal2 = notSupplied($_POST['netWorthVal5b']);
$propertyDesc3 = notSupplied($_POST['netWorthDesc5c']);
$propertyVal3 = notSupplied($_POST['netWorthVal5c']);
$propertyDesc4 = notSupplied($_POST['netWorthDesc5d']);
$propertyVal4 = notSupplied($_POST['netWorthVal5d']);
$propertyDesc5 = notSupplied($_POST['netWorthDesc5e']);
$propertyVal5 = notSupplied($_POST['netWorthVal5e']);
//Other Assets
$assetsDesc1 = notSupplied($_POST['netWorthDesc6a']);
$assetsVal1 = notSupplied($_POST['netWorthVal6a']);
$assetsDesc2 = notSupplied($_POST['netWorthDesc6b']);
$assetsVal2 = notSupplied($_POST['netWorthVal6b']);
$assetsDesc3 = notSupplied($_POST['netWorthDesc6c']);
$assetsVal3 = notSupplied($_POST['netWorthVal6c']);
$assetsDesc4 = notSupplied($_POST['netWorthDesc6d']);
$assetsVal4 = notSupplied($_POST['netWorthVal6d']);
$assetsDesc5 = notSupplied($_POST['netWorthDesc6e']);
$assetsVal5 = notSupplied($_POST['netWorthVal6e']);
//Total Assets Value
$netWorthTotalAssets = notSupplied($_POST['netWorthTotalAssets']);
//Insert data into networth
$net_query = sprintf("INSERT INTO networth(
networth_cashdesc1,
networth_cashval1,
networth_cashdesc2,
networth_cashval2,
networth_cashdesc3,
networth_cashval3,
networth_cashdesc4,
networth_cashval4,
networth_cashdesc5,
networth_cashval5,
networth_notesdesc1,
networth_notesval1,
networth_notesdesc2,
networth_notesval2,
networth_notesdesc3,
networth_notesval3,
networth_notesdesc4,
networth_notesval4,
networth_notesdesc5,
networth_notesval5,
networth_busdesc1,
networth_busval1,
networth_busdesc2,
networth_busval2,
networth_busdesc3,
networth_busval3,
networth_busdesc4,
networth_busval4,
networth_busdesc5,
networth_busval5,
networth_estatedesc1,
networth_estateval1,
networth_estatedesc2,
networth_estateval2,
networth_estatedesc3,
networth_estateval3,
networth_estatedesc4,
networth_estateval4,
networth_estatedesc5,
networth_estateval5,
networth_propertydesc1,
networth_propertyval1,
networth_propertydesc2,
networth_propertyval2,
networth_propertydesc3,
networth_propertyval3,
networth_propertydesc4,
networth_propertyval4,
networth_propertydesc5,
networth_propertyval5,
networth_assetsdesc1,
networth_assetsval1,
networth_assetsdesc2,
networth_assetsval2,
networth_assetsdesc3,
networth_assetsval3,
networth_assetsdesc4,
networth_assetsval4,
networth_assetsdesc5,
networth_assetsval5,
networth_total_assets
)
VALUES('%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%d')",
$cashDesc1,
$cashVal1,
$cashDesc2,
$cashVal2,
$cashDesc3,
$cashVal3,
$cashDesc4,
$cashVal4,
$cashDesc5,
$cashVal5,
$notesDesc1,
$notesVal1,
$notesDesc2,
$notesVal2,
$notesDesc3,
$notesVal3,
$notesDesc4,
$notesVal4,
$notesDesc5,
$notesVal5,
$businessDesc1,
$businessVal1,
$businessDesc2,
$businessVal2,
$businessDesc3,
$businessVal3,
$businessDesc4,
$businessVal4,
$businessDesc5,
$businessVal5,
$realEstateDesc1,
$realEstateVal1,
$realEstateDesc2,
$realEstateVal2,
$realEstateDesc3,
$realEstateVal3,
$realEstateDesc4,
$realEstateVal4,
$realEstateDesc5,
$realEstateVal5,
$propertyDesc1,
$propertyVal1,
$propertyDesc2,
$propertyVal2,
$propertyDesc3,
$propertyVal3,
$propertyDesc4,
$propertyVal4,
$propertyDesc5,
$propertyVal5,
$assetsDesc1,
$assetsVal1,
$assetsDesc2,
$assetsVal2,
$assetsDesc3,
$assetsVal3,
$assetsDesc4,
$assetsVal4,
$assetsDesc5,
$assetsVal5,
$netWorthTotalAssets
);
$net_result = mysql_query($net_query,$Conn) or die("Networth: ".mysql_error());
if($net_result){
$net_OK = "OK";
}
else{
$net_OK = "NO";
}
//Liabilities
//Mortgage or Liens on Real Estate
$mortgageDesc1 = notSupplied($_POST['liabilitiesDesc1a']);
$mortgageVal1 = notSupplied($_POST['liabilitiesVal1a']);
$mortgageDesc2 = notSupplied($_POST['liabilitiesDesc1b']);
$mortgageVal2 = notSupplied($_POST['liabilitiesVal1b']);
$mortgageDesc3 = notSupplied($_POST['liabilitiesDesc1c']);
$mortgageVal3 = notSupplied($_POST['liabilitiesVal1c']);
$mortgageDesc4 = notSupplied($_POST['liabilitiesDesc1d']);
$mortgageVal4 = notSupplied($_POST['liabilitiesVal1d']);
$mortgageDesc5 = notSupplied($_POST['liabilitiesDesc1e']);
$mortgageVal5 = notSupplied($_POST['liabilitiesVal1e']);
//Notes and Accounts Recievables
$recievablesDesc1 = notSupplied($_POST['liabilitiesDesc2a']);
$recievablesVal1 = notSupplied($_POST['liabilitiesVal2a']);
$recievablesDesc2 = notSupplied($_POST['liabilitiesDesc2b']);
$recievablesVal2 = notSupplied($_POST['liabilitiesVal2b']);
$recievablesDesc3 = notSupplied($_POST['liabilitiesDesc2c']);
$recievablesVal3 = notSupplied($_POST['liabilitiesVal2c']);
$recievablesDesc4 = notSupplied($_POST['liabilitiesDesc2d']);
$recievablesVal4 = notSupplied($_POST['liabilitiesVal2d']);
$recievablesDesc5 = notSupplied($_POST['liabilitiesDesc2e']);
$recievablesVal5 = notSupplied($_POST['liabilitiesVal2e']);
//Unpaid Interest and Taxes
$taxesDesc1 = notSupplied($_POST['liabilitiesDesc3a']);
$taxesVal1 = notSupplied($_POST['liabilitiesVal3a']);
$taxesDesc2 = notSupplied($_POST['liabilitiesDesc3b']);
$taxesVal2 = notSupplied($_POST['liabilitiesVal3b']);
$taxesDesc3 = notSupplied($_POST['liabilitiesDesc3c']);
$taxesVal3 = notSupplied($_POST['liabilitiesVal3c']);
$taxesDesc4 = notSupplied($_POST['liabilitiesDesc3d']);
$taxesVal4 = notSupplied($_POST['liabilitiesVal3d']);
$taxesDesc5 = notSupplied($_POST['liabilitiesDesc3e']);
$taxesVal5 = notSupplied($_POST['liabilitiesVal3e']);
//Other Liabilities
$liabilitiesDesc1 = notSupplied($_POST['liabilitiesDesc4a']);
$liabilitiesVal1 = notSupplied($_POST['liabilitiesVal4a']);
$liabilitiesDesc2 = notSupplied($_POST['liabilitiesDesc4b']);
$liabilitiesVal2 = notSupplied($_POST['liabilitiesVal4b']);
$liabilitiesDesc3 = notSupplied($_POST['liabilitiesDesc4c']);
$liabilitiesVal3 = notSupplied($_POST['liabilitiesVal4c']);
$liabilitiesDesc4 = notSupplied($_POST['liabilitiesDesc4d']);
$liabilitiesVal4 = notSupplied($_POST['liabilitiesVal4d']);
$liabilitiesDesc5 = notSupplied($_POST['liabilitiesDesc4e']);
$liabilitiesVal5 = notSupplied($_POST['liabilitiesVal4e']);
//Total Liabilities Value
$totalLiabilities = notSupplied($_POST['liabilitiesTotalDebt']);
//Insert data into liabilities
$lia_query = sprintf("INSERT INTO liabilities(
liable_mortgagedesc1,
liable_mortgageval1,
liable_mortgagedesc2,
liable_mortgageval2,
liable_mortgagedesc3,
liable_mortgageval3,
liable_mortgagedesc4,
liable_mortgageval4,
liable_mortgagedesc5,
liable_mortgageval5,
liable_recievabledesc1,
liable_recievableval1,
liable_recievabledesc2,
liable_recievableval2,
liable_recievabledesc3,
liable_recievableval3,
liable_recievabledesc4,
liable_recievableval4,
liable_recievabledesc5,
liable_recievableval5,
liable_taxesdesc1,
liable_taxesval1,
liable_taxesdesc2,
liable_taxesval2,
liable_taxesdesc3,
liable_taxesval3,
liable_taxesdesc4,
liable_taxesval4,
liable_taxesdesc5,
liable_taxesval5,
liable_liablesdesc1,
liable_liablesval1,
liable_liablesdesc2,
liable_liablesval2,
liable_liablesdesc3,
liable_liablesval3,
liable_liablesdesc4,
liable_liablesval4,
liable_liablesdesc5,
liable_liablesval5,
liable_total_liabilities
)
VALUES('%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%s','%d','%d')",
$mortgageDesc1,
$mortgageVal1,
$mortgageDesc2,
$mortgageVal2,
$mortgageDesc3,
$mortgageVal3,
$mortgageDesc4,
$mortgageVal4,
$mortgageDesc5,
$mortgageVal5,
$recievablesDesc1,
$recievablesVal1,
$recievablesDesc2,
$recievablesVal2,
$recievablesDesc3,
$recievablesVal3,
$recievablesDesc4,
$recievablesVal4,
$recievablesDesc5,
$recievablesVal5,
$taxesDesc1,
$taxesVal1,
$taxesDesc2,
$taxesVal2,
$taxesDesc3,
$taxesVal3,
$taxesDesc4,
$taxesVal4,
$taxesDesc5,
$taxesVal5,
$liabilitiesDesc1,
$liabilitiesVal1,
$liabilitiesDesc2,
$liabilitiesVal2,
$liabilitiesDesc3,
$liabilitiesVal3,
$liabilitiesDesc4,
$liabilitiesVal4,
$liabilitiesDesc5,
$liabilitiesVal5,
$totalLiabilities
);
echo "<br/>".$lia_query;
$lia_result = mysql_query($lia_query,$Conn) or die("Liabilities: ".mysql_error());
if($lia_result){
$lia_OK = "OK";
}
else{
$lia_OK = "NO";
}
if(($proposed_OK == "OK"
&& ($med_OK == "OK"
&& ($non_med_OK == "OK"
&& ($agents_OK == "OK"
&& ($auth_OK == "OK"
&& ($doc_OK == "OK"
&& ($quest_OK == "OK"
&& ($fin_OK == "OK"
&&($net_OK == "OK"
&& ($lia_OK == "OK"
){
$msg = "OK";
}
else{
$msg = "NO";
}
echo "msg=".urlencode($msg);
mysql_close($Conn);
?>
I know this is quite lengthy. I am sending the values from flash using LoadVars but when I try to capture them in the variables on this page the variables stay empty and nothing gets to the database.
i hope you can help me with this, I was thinking about storing them all in an array and sending the array to the then extracting them on the page before sending them to the database, do you think that this may fix the problem