[insert_php]

if ( $_SERVER[ ‘REQUEST_METHOD’ ] != ‘POST’ )
{

echo ‘

Answer a few basic questions to receive an instant quote!

Note: all fields are required.

What is your age?
(if you are not between 18 – 45 years old, you will need to call for a quote):

What is your gender?
Male
Female

Desired Policy Level:
\$50,000
\$100,000
\$150,000

Do you smoke?

Are you a current Allstate customer?

Do you own your residence?

Have you ever received drug or alcohol treatment?

In the past 3 months, have you been unable to perform the duties of your regular occupation for more than 10 consecutive days due to illness, injury, full or partial disability (excluding pregnancy)?

Have you been diagnosed with or treated for:
Stroke
Diabetes
Dementia
Kidney Disease
Heart Disease
Cancer
HIV/AIDs
Alzheimer\’s
None of These

Please provide your email address:

Please provide your phone number:


‘;

}
else
{

$allfields = ’empty’ ;

//Assign age field to variable
if ( !empty ( $_POST[‘age’] ) )
{
$age = $_POST[‘age’] ;

}
else
{
$allfields = ‘triggered’ ;
$age = NULL ;
}

//Assign gender field to variable
if ( !empty ( $_POST[‘gender’] ) )
{
$gender = $_POST[‘gender’] ;

}
else
{
$allfields = ‘triggered’ ;
$gender = NULL ;
}

//Assign policy field to variable
if ( !empty ( $_POST[‘policy’] ) )
{
$policy = $_POST[‘policy’] ;

}
else
{
$allfields = ‘triggered’ ;
$policy = NULL ;
}

//Assign smoke field to variable
if ( !empty ( $_POST[‘smoke’] ) )
{
$smoke = $_POST[‘smoke’] ;

}
else
{
$allfields = ‘triggered’ ;
$smoke = NULL ;
}

//Assign currentpolicy field to variable
if ( !empty ( $_POST[‘currentpolicy’] ) )
{
$currentpolicy = $_POST[‘currentpolicy’] ;

}
else
{
$allfields = ‘triggered’ ;
$currentpolicy = NULL ;
}

//Assign homeowner field to variable
if ( !empty ( $_POST[‘homeowner’] ) )
{
$homeowner = $_POST[‘homeowner’] ;

}
else
{
$allfields = ‘triggered’ ;
$homeowner = NULL ;
}

//Assign drugalcohol field to variable
if ( !empty ( $_POST[‘drugalcohol’] ) )
{
$drugalcohol = $_POST[‘drugalcohol’] ;

}
else
{
$allfields = ‘triggered’ ;
$drugalcohol = NULL ;
}

//Assign illness field to variable
if ( !empty ( $_POST[‘illness’] ) )
{
$illness = $_POST[‘illness’] ;

}
else
{
$allfields = ‘triggered’ ;
$illness = NULL ;
}

//assign diagnose field to variable

if ( !empty ( $_POST[‘diagnose’] ) )
{
$diagnose = $_POST[‘diagnose’] ;

}
else
{
$allfields = ‘triggered’ ;
$diagnose = NULL ;
}

//assign email field to variable

if ( !empty ( $_POST[’email’] ) )
{
$email = $_POST[’email’] ;

}
else
{
$allfields = ‘triggered’ ;
$email = NULL ;
}

//assign phone field to variable

if ( !empty ( $_POST[‘phone’] ) )
{
$phone = $_POST[‘phone’] ;

}
else
{
$phone = NULL ;
}

if($allfields != ‘triggered’) {

//connect to the database

$dbc = mysqli_connect( ‘localhost’ , ‘growthsp_berling’ , ‘dmvmvn111’ , ‘growthsp_quotetest’ ) OR die ( mysqli_connect_error() ) ;
mysqli_set_charset( $dbc , ‘utf-8’ ) ;

$q = “SELECT QUOTE FROM quote_rates WHERE AGE = ‘”.$age.”‘ AND CURRENTCUST = ‘”.$currentpolicy.”‘ AND GENDER = ‘”.$gender.”‘ AND TOBACCO = ‘”.$smoke.”‘ AND POLICY = ‘”.$policy.”‘” ;

$r = mysqli_query ( $dbc , $q ) ;

if ( $r )
{
$row = mysqli_fetch_array( $r , MYSQLI_NUM );
echo ‘

Thanks for your submission!

Based on the information you entered, the monthly cost of your life insurance quote would be \$’. $row[ 0 ] ;

echo ‘

Basic Term snapshot

 

Product summary

  • Simplified issued term life insurance
  • 15-year level term

Issue ages

  • Ages 18 – 45

Face amounts

  • \$50,000, \$100,000, or \$150,000

Conversion privileges

  • Option to convert term policy to a permanent policy

Basic Term is a simplified issue product not a guaranteed issue product. If a customer is interested in other specified term periods or face amounts, consider offering TrueTerm. Please visit accessallstate.com/lifeonline for additional product information.
Please call 301-599-2000 (9am-4:30pm (EST) for a Live Licensed Agent) for additional product information.


 

Underwriting

  • Hassle-free sales process with simplified underwriting.
  • No medical exam is required.
  • Policy issuance may depend on the answers to health questions in the application and third party databases.
  • Three simple database checks are used to determine eligibility for Basic Term: Medical Information Bureau (MIB), Motor Vehicle Report (MVR), and Prescription Database Check.
  • Approval or decline decision within a few days.

Additional information

  • Due to simplified underwriting, one basic term policy is allowed per customer.
  • Third party payer/owner(s) are not allowed on Basic Term.
  • Basic Term is not an option for previously declined/dropped fully underwritten business.

 

‘ ;

$quotedAmount = $row[ 0 ] ;
mysqli_free_result( $r ) ; }
else
{ echo ‘

‘ . mysqli_error( $dbc ) . ‘

‘ ; }

mysqli_close ( $dbc ) ;

//send the email

$to = “[email protected]”;
$subject = “Website Quote Generated”;
$headers = “From: [email protected]”;
$message = “A visitor to your site has generated a quote. Here is what they submitted:\n
Quoted amount : $quotedAmount \n
email : $email \n
phone : $phone \n
age : $age \n
gender : $gender \n
Desired policy : $policy \n
Do you smoke : $smoke \n
do you have a current Allstate policy? : $currentpolicy \n
do you own your residence? : $homeowner \n
Have you been treated for drugs or alcohol? : $drugalcohol \n
In the past 3 months, have you been unable to perform the duties of your regular occupation for more than 10 consecutive days due to illness, injury, full or partial disability (excluding pregnancy)? : $illness \n
Have you been diagnosed with : $diagnose[0], $diagnose[1], $diagnose[2], $diagnose[3], $diagnose[4], $diagnose[5], $diagnose[6], $diagnose[7], $diagnose[8] \n

” ;
mail($to,$subject,$message,$headers);

}
else {

echo ‘

All fields are required, including email. If you have not been diagnosed with or treated for any of the illnesses listed below, select None of These.

What is your age?
(if you are not between 18 – 45 years old, you will need to call for a quote):

What is your gender?
Male
Female

Desired Policy Level:
\$50,000
\$100,000
\$150,000

Do you smoke?

Are you a current Allstate customer?

Do you own your residence?

Have you ever received drug or alcohol treatment?

In the past 3 months, have you been unable to perform the duties of your regular occupation for more than 10 consecutive days due to illness, injury, full or partial disability (excluding pregnancy)?

Have you been diagnosed with or treated for:
Stroke
Diabetes
Dementia
Kidney Disease
Heart Disease
Cancer
HIV/AIDs
Alzheimer\’s
None of These

Please provide your email address:

Please provide your phone number:


‘;

} //end of triggered logic

}

[/insert_php]

Pin It on Pinterest

Share This