• [insert_php]

    $e= htmlspecialchars($_GET[“email”]);
    $f= htmlspecialchars($_GET[“your-fname”]);
    $l= htmlspecialchars($_GET[“your-lname”]);
    $height =htmlspecialchars($_GET[“height”]);
    $exheight=explode(‘/’,$height);
    $h = ($exheight[0]*12)+$exheight[1];
    $w = htmlspecialchars($_GET[“weight”]);
    $weight = ($w * 703);
    $b = $weight/$h;

    $bmi =round(($b/$h),1);
    $snore1 =htmlspecialchars($_GET[“snore1”]);
    $snore2 =htmlspecialchars($_GET[“snore2”]);
    $snore3 =htmlspecialchars($_GET[“snore3”]);
    $snore4 =htmlspecialchars($_GET[“snore4”]);
    $snore5 =htmlspecialchars($_GET[“snore5”]);
    $snore6 =htmlspecialchars($_GET[“snore6”]);
    $snore7 =htmlspecialchars($_GET[“snore7”]);
    $snore8 =htmlspecialchars($_GET[“snore8”]);
    $snore9 =htmlspecialchars($_GET[“snore9”]);
    $snoress =htmlspecialchars($_GET[“snoress”]);
    $category1=0; $category2=0; $category3=0; $category4=0;
    if($snore1==’Yes’){
    $category1 = 1;
    }
    if(($snore2==’Louder than talking’)||($snore2==’Very loud can be heard in adjacent’)){
    $category1 +=1;
    }
    if(($snore3==’Nearly every day’)||($snore3==’3-4 times/week’)){
    $category1 +=1;
    }
    if($snore4==’Yes’){
    $category1 +=1;
    }
    if(($snore5==’Nearly every day’)||($snore5==’3-4 times/week’)){
    $category1 +=1;
    }

    if(($snore6==’Nearly every day’)||($snore6==’3-4 times/week’)){
    $category2 +=1;
    }
    if(($snore7==’Nearly every day’)||($snore7==’3-4 times/week’)){
    $category2 +=1;
    }
    if($snore8==’Yes’){
    $category2 +=1;
    }
    if(($snore9==’Nearly every day’)||($snore9==’3-4 times/week’)){
    $category2 +=1;
    }
    if($snoress==’Yes’){
    $category3 =1;
    }
    $total=0;
    if($category1>1){
    $total+=1;
    }
    if($category2>1){
    $total+=1;
    }
    if($category3==1){
    $total+=1;
    }

    [/insert_php]

    Total Score : [insert_php] echo $total; [/insert_php]            BMI: [insert_php] echo $bmi; [/insert_php]

    [insert_php]

    $e= htmlspecialchars($_GET[“email”]);
    $f= htmlspecialchars($_GET[“your-fname”]);
    $l= htmlspecialchars($_GET[“your-lname”]);
    $height =htmlspecialchars($_GET[“height”]);
    $exheight=explode(‘/’,$height);
    $h = ($exheight[0]*12)+$exheight[1];
    $w = htmlspecialchars($_GET[“weight”]);
    $weight = ($w * 703);
    $b = $weight/$h;
    $snore1 =htmlspecialchars($_GET[“snore1”]);
    $snore2 =htmlspecialchars($_GET[“snore2”]);
    $snore3 =htmlspecialchars($_GET[“snore3”]);
    $snore4 =htmlspecialchars($_GET[“snore4”]);
    $snore5 =htmlspecialchars($_GET[“snore5”]);
    $snore6 =htmlspecialchars($_GET[“snore6”]);
    $snore7 =htmlspecialchars($_GET[“snore7”]);
    $snore8 =htmlspecialchars($_GET[“snore8”]);
    $snore9 =htmlspecialchars($_GET[“snore9”]);
    $snoress =htmlspecialchars($_GET[“snoress”]);
    $category1=0; $category2=0; $category3=0; $category4=0;
    if($snore1==’Yes’){
    $category1 = 1;
    }
    if(($snore2==’Louder than talking’)||($snore2==’Very loud can be heard in adjacent’)){
    $category1 +=1;
    }
    if(($snore3==’Nearly every day’)||($snore3==’3-4 times/week’)){
    $category1 +=1;
    }
    if($snore4==’Yes’){
    $category1 +=1;
    }
    if(($snore5==’Nearly every day’)||($snore5==’3-4 times/week’)){
    $category1 +=1;
    }

    if(($snore6==’Nearly every day’)||($snore6==’3-4 times/week’)){
    $category2 +=1;
    }
    if(($snore7==’Nearly every day’)||($snore7==’3-4 times/week’)){
    $category2 +=1;
    }
    if($snore8==’Yes’){
    $category2 +=1;
    }
    if(($snore9==’Nearly every day’)||($snore9==’3-4 times/week’)){
    $category2 +=1;
    }
    if($snoress==’Yes’){
    $category3 =1;
    }
    $total=0;
    if($category1>1){
    $total+=1;
    }
    if($category2>1){
    $total+=1;
    }
    if($category3==1){
    $total+=1;
    }
    $bmi =round(($b/$h),1);
    $to = “info@sleepapneadrs.com, testing.gaugan@gmail.com”;

    $from = “info@sleepapneadrs.com”; // this is the sender’s Email address

    $subject = “Berlin Sleep Questionnaire”;

    $message = “Patient Name : “.$f.” “.$l . “nn” .”Patient Email : “.$e. “nn Height : “.$height. “nn Weight : “.$w. “nn Category1 : “.$category1. “nn Category2 : “.$category2. “nn Category3 : “.$category3. “nn Total : “.$total. “nn BMI Result : “.$bmi;

    $headers = “From:” . $from;

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

    echo “Result Successfully Submitted. Thank you!, info@sleepapneadrs.com we will contact you shortly.”;
    // You can also use header(‘Location: thank_you.php’); to redirect to another page.

    [/insert_php]

    SCORING : If Your score is 0 or 1, you are generally considered, for the purpose of the Berlin scale, to be at low risk for obstructive sleep apnea (OSA). If your score is a 2 or 3, you are considered to be at high risk for sleep apnea.

    Please contact our office at 864-909-2672 to schedule a follow up exam with our sleep doctor.