title: PHP code in body tags
body: <p>I tried putting some php in the body tag to change the background color of the page based on what value was passed from the first page but it's not working.</p>
  
  <p>Can I do this? (Add php code inside body tag)</p>
  
  <p>If not, what would be the easiest way to change the background color of the page based on the value passed from the first page</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" type="text/css" href="style.css" media="screen" /&gt;
      &lt;meta charset=utf-8&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
      &lt;body &lt;?php
      $teamvar = $_POST['team_id'];
      if($teamvar == 1){
          $teamvar = "Celtics";
          echo "style='background-color: green;'&gt;"
      } else {
          echo "style='background-color: yellow;'&gt;"; }
              ?&gt; 
          &lt;div id=content&gt; 
          &lt;p&gt;
          Test
          &lt;/p&gt;
          &lt;/div&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>