title: PHP Default value and Print Issues
body: <p>I am currently trying to make my php, on the same page as the form, display the values correctly and calculate the overall passer rating. My calculations follow the formatting this way:</p>
  
  <p><strong>C = ((# completions/#attempts) *100 -30)/20</strong></p>
  
  <p><strong>Y= ((# yards/#attempts) -3)/4</strong></p>
  
  <p><strong>T = ((#touchdowns/#attempts) *20)</strong></p>
  
  <p><strong>I = 2.375 - (#interceptions/#attempts) * 35</strong></p>
  
  <p><strong>Pass Rating = ((C+Y+T+I)/6) *100</strong></p>
  
  <p>The table that holds the values from the form should have a default value of 0 and below it should print the overall rating of Poor, Good and Great depending on the passer rating.</p>
  
  <p>As you see I have a few issues.
  My issues are:</p>
  
  <p><strong>The Passing Rating doesn't default to 0.</strong></p>
  
  <p><strong>My Overall Rating doesn't print whether it is Poor, Good, or Great. It only prints Poor</strong></p>
  
  <p>I was hoping someone can explain this. I have been troubleshooting it for hours now. No luck sadly. ps(overall rating printed twice to see which version I want to use)</p>
  
  <p><strong>Also the snippet won't run the php unless you have php on your comp. Need a server to see it even with the snippet I guess</strong></p>
  
  <p>UPDATE: I put 20 instead of 4 to divide in Y value. That fixed my calculations but not the overall rating.</p>
  
  <p>SECOND UPDATE: I added the line:</p>
  
  <pre><code>if(($_POST['First'] != '') &amp;&amp; ($_POST['Last'] != ''))
  </code></pre>
  
  <p>so that I can keep my defaults for the table. </p>
  
  <p><strong>My last issues is now the Overall Rating displaying the correct label of either Poor, Good or Great</strong>
  <div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?php
  
  $first = "";
  $last = "";
  $completions = 0;
  $attempts = 0;
  $yards = 0;
  $touchdowns = 0;
  $interceptions = 0;
  $TotalScores = 0;
  
  if(isset($_POST['First'])) {
          $first = $_POST['First'];
  }
  
  if(isset($_POST['Last'])){
  
          $last = $_POST['Last'];
  }
  
  if(isset($_POST['completions'])) {
  
   $completions = $_POST['completions']; 
  }
  if(isset($_POST['attempts'])) {
          $attempts = $_POST['attempts'];
  }
  
  if(isset($_POST['yards'])){
  
          $yards = $_POST['yards'];
  }
  
  if(isset($_POST['touchdowns'])) {
  
   $touchdowns = $_POST['touchdowns']; 
  }
  
  
  if(isset($_POST['interceptions'])) {
  
          $interceptions = $_POST['interceptions'];
  }
  
  
  function rating ($com, $att, $yards, $touchd, $inter){
  
   //$C = 0;
   //$Y = 0;
   //$T = 0;
   //$I = 0;
   $passRating = 0;
  
   
  
   $C = ((($com /$att)*100)-30) / 20;
   $Y = (($yards/$att)-3)/4;
   $T = ($touchd/$att)*20;
   $I = 2.375 - (($inter/$att)*35);
  
   $passRating = (($C + $Y + $T + $I)/6)*100;
  
   return $passRating;
  }
  
  
  if(is_numeric($completions) &amp;&amp; is_numeric($attempts) &amp;&amp; is_numeric($yards)
      &amp;&amp; is_numeric($touchdowns) &amp;&amp; is_numeric($interceptions)) {
  
      //if(($_POST['completions'] &gt;0) &amp;&amp; ($_POST['attempts'] &gt;0) &amp;&amp; ($_POST['yards'] &gt;0)
      //      &amp;&amp; ($_POST['touchdowns'] &gt;0) &amp;&amp; ($_POST['interceptions'] &gt;0) ){
  
  
  if(($_POST['First'] != '') &amp;&amp; ($_POST['Last'] != '')){
  
      $TotalScore = rating($completions, $attempts, $yards,
                              $touchdowns, $interceptions);
      //echo $TotalScore;
      if ($TotalScore &lt; 85 &amp;&amp; $TotalScore &gt;0){
      $score = "Poor";
      }
  
      elseif($TotalScore &gt;=85 &amp;&amp; $TotalScore &lt;90){
      $score = "Mediocre";
      }
      elseif ($TotalScore &gt;=90 &amp;&amp; $TotalScore &lt;95){
      $score = "Good";
      }
  
      elseif ($score &gt;= 95){
      $score = "Great";
      }
      }
  //}
  }
  else {
  
      $score = "Invalid Input!";
      //echo $TotalScore;
  }
  
  ?&gt;</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.form-container {
  
   padding-right: 20px;
  
  
  
  }
  
  fieldset {
  
   width: 200px;
   height: 30px; 
   padding: 5px;
  
  
  }
  
  input {
   padding-bottom: 5px;
  
  }
  
  
  
  #text-container {
   margin-top: 100px;
   width: 1260px;
   height: 400px;
   background-color: white;
   text-align: left;
   margin-left: auto;
   margin-right: auto;
   border-radius: 10px;
   
  }
  
  #text-container p {
  
   margin-left: 30px;
   font-size: 20px;
  
  }
  
  #text-container h1 {
  
   margin-left: 30px;
   color: #4EA24E;
   padding-top: 10px;
  
  }
  
  #paragraph {
  
   position: absolute;
   width: 1350px;
   height: 600px;
   border: 1px solid black;
   margin-left: 500px;
   margin-top: 60px;
  
  
  }
  
  
  .signup {
  
   float: right;
   height: 600px;
   width: 500px;
   border: 1px solid black;
   background-color: blue;
  
  
  }
  
  #form-box {
  
   margin-top: 10px;
   width: 550px;
   height:600px;
   maring-left: 0;
   float: left;
   /*background-color: #B2D1F0;*/
   /*border-radius: 30px;*/
   /*box-shadow: 0 0 10px black;*/
  }
  
  #form-box label {
  
   float: left;
       width: 200px;
       text-align: right;
       margin-right: 10px;
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
       -o-text-overflow: ellipsis;
   font-size: 20px;
   margin-bottom: 30px;
   margin-left: 20px;
  }
  
  #form-box input[type="text"] {
  
   margin-bottom: 30px;
   height: 20px;
   width: 200px;
   font-size: 15px;
   margin-left: 10px;
   box-shadow: 0 0 5px black;
  
  }
  .numInput input[type="text"] {
  
          margin-bottom: 30px;
          height: 20px;
          width: 50px;
          font-size: 15px;
          margin-left: 10px;
          box-shadow: 0 0 5px black;
  }
  #form-box button {
   margin-bottom: 30px;
   height: 35px;
   width: 100px;
   font-size: 25px;
   margin-right: 100px;
   float: right;
   background-color: #4EA24E;
   color: orange;
   border-radius: 5px;
   text-shadow: 0 0 10px black;
   box-shadow: 0 0 10px black;
   font-family: Rockwell, 'Courier Bold', serif
  
  }
  
  #form-box button:hover {
  
   color: gold;
  
  }
  
  #form-box h1{
  
   text-align: left;
   margin-right: 65px;
   color: #4EA24E;
   font-size: 35px;
   margin-bottom: 0;
   text-shadow: 0 0 1px black;
   margin-left: 30px;
   }
  
  #form-box h2{
  
   text-align: right;
   margin-right: 85px;
   color: #114611;
   }
  
  #calcContainer {
   clear: both;
   width: 200px;
   height: 500px;
   float: left;
   margin-top: 600px;
   border: 1px solid black;
  }
  
  .table {
   margin-top: 20px;
  
  }
  .table td, .table tr {
   border: 1px solid black;
   width: 150px;
  
  }
  .table h3 {
   margin-top: 40px;
  
  }
  /*table {
   margin-top: 200px;
  }
  
  td , tr{
   border: 1px solid black;
   width: 150px;
  }
  */
  span {
   margin-left: 40px;
  }
  
  
  #screen {
  
  
  }
  
  html {
   margin: 0;
   padding: 0;
   min-width: 960px;
   max-width: 1000px;
   background: url(bubbles.jpg) no-repeat;
   height: 100%;
   background-size: 960px 960px;
   //margin-bottom: 100px;
  }
  
  
  
  #footer {
   width:100%;
   height:100px !important;
   border-top:4px solid black;
   background-color:orange;
   //position: relative;
   //bottom: 0;
   margin-bottom: 0 auto;
   //position: fixed;
   z-index: 10;
   clear: both;
   margin-top: 500px;
   margin-left: 30px;
  }
  #footer-inner {
   width:80%;
   margin:0 auto 0 auto;
   height:inherit;
  }
  
  body {
   margin-bottom: 100px;
   margin-right: 30px;
   padding: 0;
   width: 100%;
   height: 100%;
  }
  
  h1.name{
  
   /*font-family: Lato, 'Courier Bold', sanserif;*/
   font-family: 'KOMIKAX_';
   src: url(KOMIKAX_.tff);
   font-weight: bold;
   font-variant: small-caps;
   color: "red";
   margin-left: 30px;
   text-shadow: 0 0 1px black;
  
  }
  
  #header {
   margin-left: 30px;
   width:100%;
  }
  
  #gradient {
       height: 65px;
   /* IE 10 */
   background-image: -ms-linear-gradient(top, black 0%, orange 100%);
  
   /* Firefox */
       background-image: -moz-linear-gradient(top, black, orange); 
  
   /* Safari  &amp; Chrome */
       background-image: -webkit-gradient(linear,left bottom,left top, color-stop(0, orange),color-stop(1, black)); 
  
   box-shadow: inset 0 0 15px black;
  }
  
  
  
  #nav1 {
  
  list-style: none;
  
  }
  
  #nav2 {
  
  list-style: none;
  
  }
  
  .nav a {
  
   text-decoration: none; /*remove underline*/
   text-transform: uppercase;
   color: white;
   font-family: Rockwell, 'Courier Bold', serif;
   font-size: 20px;
   padding-bottom: 15px;
   
  }
  
  .nav li {
  
   display: inline;
   float: left;
   padding: 10px;
   
  
  }
  
  .nav a:visited {
          text-decoration: none;
          color: #fff;
      }
  .nav a:hover {
          text-decoration: none;
          color:  black;
   background-color:transparent;
  
      }
  .nav a:active {
          text-decoration: none;
          color: #19A3FF;
   
      }
  
  .container {
  
   margin-left: 30px;
   height: 560px;
   background-color: black;
   width: 1000px;
   border-radius: 3px;
   float: left;
  }
  
  .text-left {
  
   float: left;
   padding-left: 30px;
  }
  
  .text-right {
  
   float: right;
   padding-right: 55px;
  }
  
  .text-center {
  
   float: center;
   margin: auto 0;
  }
  
  .MainImage {
  
   background-image: url(http://cdn2.sportngin.com/attachments/photo/2021/8243/football_large.jpg); 
  
   height: 300px;
   background-repeat: no-repeat;
   width:99.8%;
   -webkit-background-size: cover;
   -moz-background-size: cover;
   -o-background-size: cover;
   background-size: 100%;
   padding-bottom: 30px;
   display: block;
   border: 1px solid;
   margin-left: 30px;
   opacity: 0.9;
        filter: alpha(opacity=90); /* For IE8 and earlier */
  }
  
  
  h1.title {
  
   color: white;
   padding-left: 30px;
   padding-top: 10px;
   font-size: 60px;
   font-family: Rockwell, 'Courier Bold', serif;
   font-variant: small-caps;
   font-weight: bold;
   text-shadow: 0 0 3px black;
   margin-bottom: 0;
  }
  
  
  
  #sub {
  
   color: white;
   padding-left: 80px;
   font-size: 30px;
   font-family: Rockwell, 'Courier Bold', serif;
   font-variant: small-caps;
   text-shadow: 0 0 8px black;
   
  
  }
  
  /*.highlight {
  
   /*text-shadow: 0 0 10px #E6FFFF;*/
   text-shadow: 0 0 10px rgba(255,255,255,1) , 0 0 20px rgba(255,255,255,1) , 0 0 30px rgba(255,255,255,1) , 0 0 40px #ff00de , 0 0 70px #ff00de , 0 0 80px #ff00de , 0 0 100px #ff00de ;
  
   filter: glow(color=#E6FFFF, strength=3);
   color: red;
   
  
  }*/
  
  #sidebar {
  
   height: 1200px;
   width: 400px;
   float: left;
   background-color: #99CC99;
   margin-top: 50px;
   font-size: 25px;
   margin-right: 0;
  }
  
  #main-container {
  
   width: 1260px;
   height: 230px;
   margin-top: 30px;
   postion: relative;
   margin-left: auto;
   margin-right: auto;
   margin-bottom: 0;
  }
  
  #main-container2 {
  
   width: 1260px;
   height: 230px;
   postion: relative;
   margin-left: auto;
   margin-right: auto;
   margin-top: 0;
    
  
  }
  
  
  #columns {
  
   float: left;
   width: 370px;
       height: 230px;
       background-color: #ECF2F8;
       text-align: center;
    display: inline-block;
   vertical-align: top;
   margin-left: 20px;
   border-radius: 10px;
   box-shadow: 0 0 10px black;
   padding-left: 10px;
   padding-right: 10px;
   border: 1px solid black;
  
  
  }
  
  #columns-image {
  
   foat: left;
   width: 390px;
   border: 1px solid black;
       height: 230px;
    display: inline-block;
   margin-left: 18px;
   border-radius: 5px;
   border: 1px solid black;
  
  }
  
  #bar-left {
  
   height: 230px;
   width: 30px;
   background-color: blue;
   float: left;
   margin-right: 20px;
   margin-top: 30px;
   margin-left: 0;
  
  
  }
  
  #bar-right {
  
   height: 230px;
   width: 30px;
   background-color: blue;
   float: left;
  
  
  }
  
  #bullet {
  
   list-style-Type: none;
   padding: 0 0 4px 23px;
   background: ur(http://www.computerhope.com/arrow.gif) no-repeat left top;
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  
  
  &lt;head&gt;
   &lt;link rel = "stylesheet" href = "stylesheet.css" type = "text/css"&gt;
   &lt;link rel = "stylesheet" href = "formstylesheet.css" type = "text/css"&gt;
   &lt;meta http-equiv="X-UA-Compatible" content="IE=80" /&gt;
  &lt;/head&gt;
  
  
  &lt;div id = "screen"&gt;
  
  
  
  
  &lt;body&gt;
  
  
  &lt;h1 class = "name"&gt;&lt;font color = "orange" font size = "20px"&gt; Passer Ratings |  &lt;/font&gt;&lt;font size = "12" font color = "#4EA24E"&gt; Monitor Your Results to Improve!&lt;/font&gt;&lt;/h1&gt;
  
   &lt;div id = "header"&gt;
    &lt;div id = "gradient"&gt;
     &lt;div class = "nav"&gt;
  
    &lt;!-- container-fluid gives full width container of whole viewport --&gt;
  
    &lt;div class = "container-fluid"&gt;
  
    &lt;ul id = "nav1" class= "text-left"&gt;
     &lt;li&gt;&lt;a href = "main.html"&gt;&lt;strong&gt;Home&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href = "#"&gt;About Us&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href = "#"&gt;Teach&lt;/a&gt;&lt;/li&gt;
     &lt;li&gt;&lt;a href = "#"&gt;Score Board&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  
    &lt;ul id = "nav2" class = "text-right"&gt;
     &lt;li&gt;&lt;a href = "#"&gt;&lt;strong&gt;Contact&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  
    &lt;/div&gt;&lt;!-- end container-fluid--&gt;
     &lt;/div&gt;&lt;!--end nav--&gt;
    &lt;/div&gt;
   &lt;/div&gt; &lt;!-- end header --&gt;
  
  
  
   &lt;div id = "Main"&gt;
  
     &lt;div class = "MainImage"&gt;
  
    &lt;h1 class = "title"&gt; Knowing your Strengths and Weaknesses..&lt;br&gt;&lt;/h1&gt;
    &lt;p id = "sub"&gt;&lt;font color= "#4DFFFF"&gt;&lt;strong&gt; Makes&lt;/strong&gt;
      &lt;/font&gt; a great player... &lt;/p&gt;
  
     &lt;/div&gt;&lt;!-- end MainImage--&gt;
   
    &lt;form id ="form-box" action = 'passrating.php' method = 'post'&gt;
    &lt;h1&gt;Calculate Passer Rating&lt;br&gt;&lt;br&gt; 
    &lt;h2&gt;Submit to Review the information &lt;/h2&gt;
  
    
        &lt;label&gt;First Name &lt;/label&gt;
        &lt;input type="text" name = 'First' placeholder='First'/&gt;&lt;br/&gt;
        &lt;label&gt;Last Name:&lt;/label&gt;
        &lt;input type="text" name = 'Last' placeholder='Last'/&gt;&lt;br/&gt;
    &lt;label&gt;Pass Completions&lt;/label&gt;
        &lt;input type="text" name = 'completions' value = 0 class = 'numInput'&gt;&lt;br/&gt;
    &lt;label&gt;Pass Attempts:&lt;/label&gt;
                  &lt;input type="text" name = 'attempts' value = 0&gt;&lt;br/&gt;
                  &lt;label&gt;Total Passing Yards:&lt;/label&gt;
                  &lt;input type="text" name = 'yards' value = 0&gt;&lt;br/&gt;
                  &lt;label&gt;Touchdowns:&lt;/label&gt;
                  &lt;input type="text" name = 'touchdowns' value = 0&gt;&lt;br/&gt;
                  &lt;label&gt;Interceptions:&lt;/label&gt;
                  &lt;input type="text" name = 'interceptions' value = 0&gt;&lt;br/&gt;
    &lt;button type="reset" value="Reset"&gt;Reset&lt;/button&gt;
    &lt;button type="submit" value="Submit"&gt;Submit&lt;/button&gt;
  
    &lt;/form&gt;
  
  &lt;div class='calcContainer'&gt;
  
    &lt;table class='table' action = 'passrating.php' method = 'post'&gt;
    &lt;h3&gt;Totals for Calculations&lt;/h3&gt;
      &lt;tr&gt; Test Case:&lt;?php echo "\t" .$first. "\t" .$last; ?&gt;&lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Pass Completions &lt;/td&gt;
        &lt;td width = "20px"&gt;&lt;span value = 0&gt;&lt;?php echo $completions; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Pass Attempts &lt;/td&gt;
        &lt;td&gt;&lt;span value = 0&gt;&lt;?php echo $attempts; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Total Passing Yards &lt;/td&gt;
        &lt;td&gt;&lt;span value = 0&gt;&lt;?php echo $yards; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Touchdowns &lt;/td&gt;
        &lt;td&gt;&lt;span value =0&gt;&lt;?php echo $touchdowns; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Interceptions: &lt;/td&gt;
        &lt;td&gt;&lt;span value = 0 &gt;&lt;?php echo $interceptions; ?&gt;&lt;/td&gt;
             &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Passing Rating: &lt;/td&gt;
        &lt;td&gt;&lt;span value = 0 &gt;&lt;?php echo $TotalScore; ?&gt;&lt;/td&gt;
     &lt;/table&gt;
  
   &lt;p value = " "&gt;The Overall Rating is: &lt;?php echo $score; ?&gt;&lt;/p&gt;
  
   &lt;p value = ""&gt;&lt;?php echo "The Overall Rating is: " .$score. "&lt;/br&gt;"; ?&gt;&lt;/p&gt; 
  
  &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  
  
  &lt;head&gt;
      &lt;link rel = "stylesheet" href = "stylesheet.css" type = "text/css"&gt;
      &lt;link rel = "stylesheet" href = "formstylesheet.css" type = "text/css"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=80" /&gt;
  &lt;/head&gt;
  
  
  &lt;div id = "screen"&gt;
  
  
  
  
  &lt;body&gt;
  
  
  &lt;h1 class = "name"&gt;&lt;font color = "orange" font size = "20px"&gt; Passer Ratings |  &lt;/font&gt;&lt;font size = "12" font color = "#4EA24E"&gt; Monitor Your Results to Improve!&lt;/font&gt;&lt;/h1&gt;
  
      &lt;div id = "header"&gt;
          &lt;div id = "gradient"&gt;
              &lt;div class = "nav"&gt;
  
          &lt;!-- container-fluid gives full width container of whole viewport --&gt;
  
          &lt;div class = "container-fluid"&gt;
  
          &lt;ul id = "nav1" class= "text-left"&gt;
              &lt;li&gt;&lt;a href = "main.html"&gt;&lt;strong&gt;Home&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href = "#"&gt;About Us&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href = "#"&gt;Teach&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href = "#"&gt;Score Board&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
  
          &lt;ul id = "nav2" class = "text-right"&gt;
              &lt;li&gt;&lt;a href = "#"&gt;&lt;strong&gt;Contact&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
  
          &lt;/div&gt;&lt;!-- end container-fluid--&gt;
              &lt;/div&gt;&lt;!--end nav--&gt;
          &lt;/div&gt;
      &lt;/div&gt; &lt;!-- end header --&gt;
  
  
  
      &lt;div id = "Main"&gt;
  
              &lt;div class = "MainImage"&gt;
  
          &lt;h1 class = "title"&gt; Knowing your Strengths and Weaknesses..&lt;br&gt;&lt;/h1&gt;
          &lt;p id = "sub"&gt;&lt;font color= "#4DFFFF"&gt;&lt;strong&gt; Makes&lt;/strong&gt;
                  &lt;/font&gt; a great player... &lt;/p&gt;
  
              &lt;/div&gt;&lt;!-- end MainImage--&gt;
  
          &lt;form id ="form-box" action = 'passrating.php' method = 'post'&gt;
          &lt;h1&gt;Calculate Passer Rating&lt;br&gt;&lt;br&gt; 
          &lt;h2&gt;Submit to Review the information &lt;/h2&gt;
  
  
              &lt;label&gt;First Name &lt;/label&gt;
              &lt;input type="text" name = 'First' placeholder='First'/&gt;&lt;br/&gt;
              &lt;label&gt;Last Name:&lt;/label&gt;
              &lt;input type="text" name = 'Last' placeholder='Last'/&gt;&lt;br/&gt;
          &lt;label&gt;Pass Completions&lt;/label&gt;
              &lt;input type="text" name = 'completions' value = 0 class = 'numInput'&gt;&lt;br/&gt;
          &lt;label&gt;Pass Attempts:&lt;/label&gt;
                  &lt;input type="text" name = 'attempts' value = 0&gt;&lt;br/&gt;
                  &lt;label&gt;Total Passing Yards:&lt;/label&gt;
                  &lt;input type="text" name = 'yards' value = 0&gt;&lt;br/&gt;
                  &lt;label&gt;Touchdowns:&lt;/label&gt;
                  &lt;input type="text" name = 'touchdowns' value = 0&gt;&lt;br/&gt;
                  &lt;label&gt;Interceptions:&lt;/label&gt;
                  &lt;input type="text" name = 'interceptions' value = 0&gt;&lt;br/&gt;
          &lt;button type="reset" value="Reset"&gt;Reset&lt;/button&gt;
          &lt;button type="submit" value="Submit"&gt;Submit&lt;/button&gt;
  
          &lt;/form&gt;
  
  &lt;div class='calcContainer'&gt;
  
    &lt;table class='table' action = 'passrating.php' method = 'post'&gt;
    &lt;h3&gt;Totals for Calculations&lt;/h3&gt;
      &lt;tr&gt; Test Case:&lt;?php echo "\t" .$first. "\t" .$last; ?&gt;&lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Pass Completions &lt;/td&gt;
        &lt;td width = "20px"&gt;&lt;span value = 0&gt;&lt;?php echo $completions; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Pass Attempts &lt;/td&gt;
        &lt;td&gt;&lt;span value = 0&gt;&lt;?php echo $attempts; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Total Passing Yards &lt;/td&gt;
        &lt;td&gt;&lt;span value = 0&gt;&lt;?php echo $yards; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Touchdowns &lt;/td&gt;
        &lt;td&gt;&lt;span value =0&gt;&lt;?php echo $touchdowns; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Interceptions: &lt;/td&gt;
        &lt;td&gt;&lt;span value = 0 &gt;&lt;?php echo $interceptions; ?&gt;&lt;/td&gt;
             &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Passing Rating: &lt;/td&gt;
        &lt;td&gt;&lt;span value = 0 &gt;&lt;?php echo $TotalScore; ?&gt;&lt;/td&gt;
     &lt;/table&gt;
  
      &lt;p value = " "&gt;The Overall Rating is: &lt;?php echo $score; ?&gt;&lt;/p&gt;
  
      &lt;p value = ""&gt;&lt;?php echo "The Overall Rating is: " .$score. "&lt;/br&gt;"; ?&gt;&lt;/p&gt; 
  
  &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>