title: How can I call a PHP variable within a HTML Textbox Tag?
body: <p>Apparently, I can't produce an output in this code due to the error Undefined Variable. It makes it difficult because I can't test whether or not my condition statement works. @_@ Please help. :( Am I using Nested IFs right?</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>&lt;html&gt;
  &lt;script type="text/javascript"&gt;
  function checkform(form){
  
  if (form.bp.value=="") {
  alert("Please enter basic pay!");
  form.bp.focus;
  return false;
  }
  else if (form.payper.value==" ") {
  alert("Please enter Payroll Period!");
  form.payper.focus;
  return false; 
  }
  else if (form.stat.value==" ") {
  alert("Please enter Employee Status!");
  form.stat.focus;
  return false; 
  }
  else
  return true;
  }
  &lt;/script&gt;
  &lt;body bgcolor = "black" &gt;
  &lt;center&gt;
  &lt;title&gt; Tax Calculator &lt;/title&gt;
  
  
  
  &lt;style&gt;
  table
  {
  border-collapse:collapse;
  }
  table, td, th
  {
  font-family:"Arial";
  border:1px solid black;
  text-align:center;
  padding:5px;
  font-size:12px;
  }
  th
  {
  background-color:crimson;
  color:white;
  padding:5px;
  }
  td
  {
  background-color:gray;
  color:white;
  font-style:italic
  &lt;/style&gt;
  
  
  
  &lt;form action="d2.php" method = "post" enctype="multipart/form-data" onsubmit="return checkform(this)"&gt;
  &lt;br&gt; &lt;br&gt;
  &lt;table&gt;
  &lt;th colspan=10&gt;Employee Tax Calculator&lt;/th&gt;
  
  &lt;tr&gt;&lt;td&gt;Basic Pay: &lt;/td&gt;
  &lt;td&gt;&lt;input type="text" name="bp"&gt;&lt;/td&gt;&lt;/tr&gt;
  
  &lt;tr&gt;&lt;td&gt;Payroll Period: &lt;/td&gt;
  &lt;td&gt;&lt;select name = "payper" &gt;
      &lt;option value=" "&gt; -Select- &lt;/option&gt;
      &lt;option value="Daily"&gt; Daily &lt;/option&gt;
      &lt;option value="Weekly"&gt; Weekly &lt;/option&gt;
      &lt;option value="Semi"&gt; Semi-Monthly &lt;/option&gt;
      &lt;option value="Monthly"&gt; Monthly &lt;/option&gt;
      &lt;/select&gt;
  &lt;/td&gt;
  
  &lt;tr&gt;&lt;td&gt;Employee Status: &lt;/td&gt;
  &lt;td&gt;&lt;select name = "stat" &gt;
      &lt;option value=" "&gt; -Select- &lt;/option&gt;
      &lt;option value="Z"&gt; Z &lt;/option&gt;
      &lt;option value="S"&gt; S / ME &lt;/option&gt;
      &lt;option value="ME1"&gt; ME1 / S1 &lt;/option&gt;
      &lt;option value="ME2"&gt; ME2 / S2 &lt;/option&gt;
      &lt;option value="ME3"&gt; ME3 / S3 &lt;/option&gt;
      &lt;option value="ME4"&gt; ME4 / S4 &lt;/option&gt;
      &lt;/select&gt;
  &lt;/td&gt;
  
  
  &lt;tr&gt;&lt;td&gt;Withholding Tax: &lt;/td&gt;
  &lt;td&gt; &lt;?php echo $wtax; ?&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;input type="Submit" value="Calculate" name="Calculate"&gt;
  
  &lt;/form&gt;
  
  &lt;?php
  
  IF (isset($_POST['Calculate'])) {
  
  $bp = $_POST['bp'];
  $payper = $_POST['payper'];
  $stat = $_POST['stat'];
  $trate = 0;
  $btax= 0;
  $incomeb = 0;
  
  $wtax = ($bp - $incomeb) * $trate + $btax;
  
  
  IF ($payper == "Daily" &amp;&amp; $stat == "Z") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb== 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb == 0) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=33 ) {
      $trate = .10;
      $btax = 1.65;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=99) {
      $trate = .15;
      $btax = 8.25;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=231) {
      $trate = .20;
      $btax = 28.05;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 462) {
      $trate = .25;
      $btax = 74.26;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 825) {
      $trate = .30;
      $btax = 165.02;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1650) {
      $trate = .32;
      $btax = 412.54;
      }   
  }
  
  IF ($payper == "Daily" &amp;&amp; $stat == "S") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 165) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=198 ) {
      $trate = .10;
      $btax = 1.65;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 264) {
      $trate = .15;
      $btax = 8.25;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 396) {
      $trate = .20;
      $btax = 28.05;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 627) {
      $trate = .25;
      $btax = 74.26;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 990) {
      $trate = .30;
      $btax = 165.02;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1815) {
      $trate = .32;
      $btax = 412.54;
      }   
  }
  
  IF ($payper == "Daily" &amp;&amp; $stat == "ME1") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=248) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=281 ) {
      $trate = .10;
      $btax = 1.65;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 347) {
      $trate = .15;
      $btax = 8.25;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 479) {
      $trate = .20;
      $btax = 28.05;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=710) {
      $trate = .25;
      $btax = 74.26;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=1073) {
      $trate = .30;
      $btax = 165.02;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=1898) {
      $trate = .32;
      $btax = 412.54;
      }   
  }
  
  IF ($payper == "Daily" &amp;&amp; $stat == "ME2") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=330) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=363 ) {
      $trate = .10;
      $btax = 1.65;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=429) {
      $trate = .15;
      $btax = 8.25;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=561) {
      $trate = .20;
      $btax = 28.05;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=792) {
      $trate = .25;
      $btax = 74.26;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=1155) {
      $trate = .30;
      $btax = 165.02;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=1980) {
      $trate = .32;
      $btax = 412.54;
      }   
  }
  
  IF ($payper == "Daily" &amp;&amp; $stat == "ME3") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 413) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=446 ) {
      $trate = .10;
      $btax = 1.65;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=512) {
      $trate = .15;
      $btax = 8.25;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 644) {
      $trate = .20;
      $btax = 28.05;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 875) {
      $trate = .25;
      $btax = 74.26;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1238) {
      $trate = .30;
      $btax = 165.02;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2063) {
      $trate = .32;
      $btax = 412.54;
      }   
  }
  
  IF ($payper == "Daily" &amp;&amp; $stat == "ME4") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=1 ) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 495) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 528 ) {
      $trate = .10;
      $btax = 1.65;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 594) {
      $trate = .15;
      $btax = 8.25;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 726) {
      $trate = .20;
      $btax = 28.05;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 957) {
      $trate = .25;
      $btax = 74.26;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1320) {
      $trate = .30;
      $btax = 165.02;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2145) {
      $trate = .32;
      $btax = 412.54;
      }   
  }
  
  
  IF ($payper == "Weekly" &amp;&amp; $stat == "Z") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb == 0) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 192 ) {
      $trate = .10;
      $btax = 9.62;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 577) {
      $trate = .15;
      $btax = 48.08;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1346) {
      $trate = .20;
      $btax = 163.46;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2692) {
      $trate = .25;
      $btax = 432.69;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 4808) {
      $trate = .30;
      $btax = 961.54;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 9615) {
      $trate = .32;
      $btax = 2403.85;
      }   
  }
  
  IF ($payper == "Weekly" &amp;&amp; $stat == "S") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 962) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1154 ) {
      $trate = .10;
      $btax = 9.62;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1538) {
      $trate = .15;
      $btax = 48.08;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2308) {
      $trate = .20;
      $btax = 163.46;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 3654) {
      $trate = .25;
      $btax = 432.69;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5769) {
      $trate = .30;
      $btax = 961.54;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 10577) {
      $trate = .32;
      $btax = 2403.85;
      }   
  }
  
  IF ($payper == "Weekly" &amp;&amp; $stat == "ME1") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1442) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1635) {
      $trate = .10;
      $btax = 9.62;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2019) {
      $trate = .15;
      $btax = 48.08;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2788) {
      $trate = .20;
      $btax = 163.46;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 4135) {
      $trate = .25;
      $btax = 432.69;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 6250) {
      $trate = .30;
      $btax = 961.54;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 11058) {
      $trate = .32;
      $btax = 2403.85;
      }   
  }
  
  IF ($payper == "Weekly" &amp;&amp; $stat == "ME2") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1923) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2115 ) {
      $trate = .10;
      $btax = 9.62;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2500) {
      $trate = .15;
      $btax = 48.08;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 3269) {
      $trate = .20;
      $btax = 163.46;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 4615) {
      $trate = .25;
      $btax = 432.69;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 6731) {
      $trate = .30;
      $btax = 961.54;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 11538) {
      $trate = .32;
      $btax = 2403.85;
      }   
  }
  
  IF ($payper == "Weekly" &amp;&amp; $stat == "ME3") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2404) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2596) {
      $trate = .10;
      $btax = 9.62;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2981) {
      $trate = .15;
      $btax = 48.08;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 3750) {
      $trate = .20;
      $btax = 163.46;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5096) {
      $trate = .25;
      $btax = 432.69;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 7212) {
      $trate = .30;
      $btax = 961.54;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 12019) {
      $trate = .32;
      $btax = 2403.85;
      }   
  }
  
  IF ($payper == "Weekly" &amp;&amp; $stat == "ME4") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2885) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 3077) {
      $trate = .10;
      $btax = 9.62;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 3462) {
      $trate = .15;
      $btax = 48.08;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 4231) {
      $trate = .20;
      $btax = 163.46;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5577) {
      $trate = .25;
      $btax = 432.69;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 7692) {
      $trate = .30;
      $btax = 961.54;
      }
      ELSE IF($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=12500) {
      $trate = .32;
      $btax = 2403.85;
      }   
  }
  
  IF ($payper == "Semi" &amp;&amp; $stat == "Z") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb == 0) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 417 ) {
      $trate = .10;
      $btax = 20.83;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1250) {
      $trate = .15;
      $btax = 104.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2917) {
      $trate = .20;
      $btax = 354.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5833) {
      $trate = .25;
      $btax = 937.50;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 10417) {
      $trate = .30;
      $btax = 2083.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 20833) {
      $trate = .32;
      $btax = 5208.33;
      }   
  }
  IF ($payper == "Semi" &amp;&amp; $stat == "S") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2083) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2500 ) {
      $trate = .10;
      $btax = 20.83;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 3333) {
      $trate = .15;
      $btax = 104.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5000) {
      $trate = .20;
      $btax = 354.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 7917) {
      $trate = .25;
      $btax = 937.50;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 12500) {
      $trate = .30;
      $btax = 2083.33;
      }
      ELSE IF($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 22917) {
      $trate = .32;
      $btax = 5208.33;
      }   
  
  }
  
  IF ($payper == "Semi" &amp;&amp; $stat == "ME1") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 3215) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 3542) {
      $trate = .10;
      $btax = 20.83;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=4375) {
      $trate = .15;
      $btax = 104.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=6042) {
      $trate = .20;
      $btax = 354.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=8958) {
      $trate = .25;
      $btax = 937.50;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 13542) {
      $trate = .30;
      $btax = 2083.33;
      }
      ELSE IF($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=23958) {
      $trate = .32;
      $btax = 5208.33;
      }   
  }
  
  
  IF ($payper == "Semi" &amp;&amp; $stat == "ME2") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 4617) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 4583) {
      $trate = .10;
      $btax = 20.83;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5417) {
      $trate = .15;
      $btax = 104.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 7083) {
      $trate = .20;
      $btax = 354.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 10000) {
      $trate = .25;
      $btax = 937.50;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 14583) {
      $trate = .30;
      $btax = 2083.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 25000) {
      $trate = .32;
      $btax = 5208.33;
      }   
  }
  
  IF ($payper == "Semi" &amp;&amp; $stat == "ME3") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5208) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5625) {
      $trate = .10;
      $btax = 20.83;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 6458) {
      $trate = .15;
      $btax = 104.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 8125) {
      $trate = .20;
      $btax = 354.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 11042) {
      $trate = .25;
      $btax = 937.50;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 15625) {
      $trate = .30;
      $btax = 2083.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 26042) {
      $trate = .32;
      $btax = 5208.33;
      }   
  }
  
  IF ($payper == "Semi" &amp;&amp; $stat == "ME4") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 6250) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 6667) {
      $trate = .10;
      $btax = 20.83;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 7500) {
      $trate = .15;
      $btax = 104.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 9167) {
      $trate = .20;
      $btax = 354.17;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 12083) {
      $trate = .25;
      $btax = 937.50;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 16667) {
      $trate = .30;
      $btax = 2083.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 27083) {
      $trate = .32;
      $btax = 5208.33;
      }   
  }
  
  IF ($payper == "Monthly" &amp;&amp; $stat == "Z") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb == 0) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 833) {
      $trate = .10;
      $btax = 41.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 2500) {
      $trate = .15;
      $btax = 208.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5833) {
      $trate = .20;
      $btax = 708.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=11667) {
      $trate = .25;
      $btax = 1875.00;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 20833) {
      $trate = .30;
      $btax = 4166.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 41667) {
      $trate = .32;
      $btax = 10416.67;
      }   
  }
  
  IF ($payper == "Monthly" &amp;&amp; $stat == "S") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 4167) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 5000) {
      $trate = .10;
      $btax = 41.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 6667) {
      $trate = .15;
      $btax = 208.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 10000) {
      $trate = .20;
      $btax = 708.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=15833) {
      $trate = .25;
      $btax = 1875.00;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 25000) {
      $trate = .30;
      $btax = 4166.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 45833) {
      $trate = .32;
      $btax = 10416.67;
      }   
  }
  
  IF ($payper == "Monthly" &amp;&amp; $stat == "ME1") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 6250) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 7083) {
      $trate = .10;
      $btax = 41.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 8750) {
      $trate = .15;
      $btax = 208.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 12083) {
      $trate = .20;
      $btax = 708.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=17917) {
      $trate = .25;
      $btax = 1875.00;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 27083) {
      $trate = .30;
      $btax = 4166.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 47917) {
      $trate = .32;
      $btax = 10416.67;
      }   
  }
  
  IF ($payper == "Monthly" &amp;&amp; $stat == "ME2") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 8333) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 9167) {
      $trate = .10;
      $btax = 41.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 10833) {
      $trate = .15;
      $btax = 208.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 14167) {
      $trate = .20;
      $btax = 708.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 20000) {
      $trate = .25;
      $btax = 1875.00;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 29167) {
      $trate = .30;
      $btax = 4166.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 50000) {
      $trate = .32;
      $btax = 10416.67;
      }   
  }
  
  IF ($payper == "Monthly" &amp;&amp; $stat == "ME3") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 10417) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 11250) {
      $trate = .10;
      $btax = 41.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 12917) {
      $trate = .15;
      $btax = 208.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 16250) {
      $trate = .20;
      $btax = 708.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 22083) {
      $trate = .25;
      $btax = 1875.00;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 31250) {
      $trate = .30;
      $btax = 4166.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 52083) {
      $trate = .32;
      $btax = 10416.67;
      }   
  }
  
  IF ($payper == "Monthly" &amp;&amp; $stat == "ME4") {
      IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 1) {
      $trate = .0;
      $btax = 0;  
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 12500) {
      $trate = .05;
      $btax = 0;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 13333) {
      $trate = .10;
      $btax = 41.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 15000) {
      $trate = .15;
      $btax = 208.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 18333) {
      $trate = .20;
      $btax = 708.33;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=24167) {
      $trate = .25;
      $btax = 1875.00;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;= 33333) {
      $trate = .30;
      $btax = 4166.67;
      }
      ELSE IF ($bp &gt;= $incomeb &amp;&amp; $incomeb &gt;=54167) {
      $trate = .32;
      $btax = 10416.67;
      }   
  }
  
  echo '&lt;font color="white"&gt;' . $wtax . '&lt;/font&gt;';
  
  }
  
  ?&gt; 
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;div id="footer" size= 8  style="background-color:#656565; clear:both; text-align:center; font-size: 12px; font-family: 'Comic Sans MS', cursive;color:white"&gt;
  &lt;b&gt;Copyright @ Eun Mendoza&lt;/b&gt;&lt;/div&gt;
  &lt;hr&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>