title: Including file breaks php script
body: <p>Whenever I include a certain file in my PHP script, it breaks the code and only loads the stylesheet. I'm not sure what might be causing this issue. Is it caused by dependencies? I'm not sure if PHP inherits values, etc. </p>
  
  <p>search.php calls a function in tablegen.php. </p>
  
  <pre><code>include 'tablegen.php';
  </code></pre>
  
  <p>tablegen.php creates a variable, and returns it. </p>
  
  <p>Now, I want to pass this variable into a function in email.php.
  However, when I do this: </p>
  
  <pre><code>include 'email.php';
  </code></pre>
  
  <p>This breaks the php script in "tablegen.php" and only a blank page with the background loads.</p>
  
  <p>Thanks for any insight on this issue.</p>
  
  <p>Full search.php file. </p>
  
  <pre><code>       &lt;html&gt;
  &lt;head&gt;
  &lt;style type="text/css"&gt;
  table {
  background-color: #C0C0C0;
  }
  
  th{
  width: 150px;
  text-align:center;
  border-style: solid;
  border-width: 2px;
  border-color: black;
  background-color: #008080;
  font-family: Helvetica;
  }
  td {
  border-style: solid;
  border-width: 2px;
  border-color: black;
  font-family: Helvetica;
  background-color: #FFFF00;
  text-align:center;
  }
  body {
  background-color:#1C2932;
  }
  
  h1 {
  font-family: Helvetica;
  font-size: 24px;
  color: #989898;
  }
  
  p {
  font-family: Helvetica;
  font-size: 18px;
  color: #989898;
  }
  
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;?php
  include 'tablegen.php';
  include 'email.php';
  if (empty($_POST['term'])) {
  header("location:landing.php");
  }
  if(isset ($_POST['term'])) {
  $x = $_POST['term'];
       connect();
       $result=tableGen($x);
  
  }//end main if
  
  
  
  echo "&lt;form action='search.php' method = 'post'&gt;";
  echo "&lt;p&gt;&lt;b&gt;Do you want this in an email?&lt;/b&gt;&lt;/p&gt;";
  echo "&lt;input type='text' name='send'&gt;";
  echo "&lt;input type='submit' name='submit' value='Send!' /&gt;";
  echo "&lt;/form&gt;";
  if(isset($_POST['send'])) {
  sendEmail($result);
  }
  
  ?&gt;
  &lt;br&gt;&lt;/br&gt;
  &lt;form method="LINK" action="landing.php"&gt;
  &lt;input type="submit" value="Go Back!"&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Full tablegen.php file</p>
  
  <pre><code>&lt;?php
  include 'email.php';
  function connect(){
  
      mysql_connect("localhost","root","water123") or die ('Error Reaching Database');
      mysql_select_db("MathGuide");
  
  
  }   
      //Area  51, idk what I'm doing
  
  function tableGen($x) {
  $term=$x;
  $sql = mysql_query("select * from student_info where ID like '$term'");
  $output = "";
  $output .= "&lt;h1&gt;STUDENT DATA for ID: $term&lt;/h1&gt;";
  $output .=  "&lt;table&gt;";
  $output .=  "&lt;tr&gt;
  &lt;th&gt;ID&lt;/th&gt;
  &lt;th&gt;Project&lt;/th&gt;
  &lt;th&gt;Starter Project&lt;/th&gt;
  &lt;th&gt;Course&lt;/th&gt;
  &lt;th&gt;KDs Completed in your Course&lt;/th&gt;
  &lt;th&gt;Projects Completed&lt;/th&gt;
  &lt;th&gt;Project 1&lt;/th&gt;
  &lt;th&gt;P1KD1&lt;/th&gt;
  &lt;th&gt;P1KD2&lt;/th&gt;
  &lt;th&gt;P1KD3&lt;/th&gt;
  &lt;th&gt;P1KD4&lt;/th&gt;
  &lt;th&gt;P1KD5&lt;/th&gt;
  &lt;th&gt;Project 2&lt;/th&gt;
  &lt;th&gt;P2KD1&lt;/th&gt;
  &lt;th&gt;P2KD2&lt;/th&gt;
  &lt;th&gt;P2KD3&lt;/th&gt;
  &lt;th&gt;P2KD4&lt;/th&gt;
  &lt;th&gt;P2KD5&lt;/th&gt;
  &lt;th&gt;Project 3&lt;/th&gt;
  &lt;th&gt;P3KD1&lt;/th&gt;
  &lt;th&gt;P3KD2&lt;/th&gt;
  &lt;th&gt;P3KD3&lt;/th&gt;
  &lt;th&gt;P3KD4&lt;/th&gt;
  &lt;th&gt;P3KD5&lt;/th&gt;
  &lt;th&gt;Project 4&lt;/th&gt;
  &lt;th&gt;P4KD1&lt;/th&gt;
  &lt;th&gt;P4KD2&lt;/th&gt;
  &lt;th&gt;P4KD3&lt;/th&gt;
  &lt;th&gt;P4KD4&lt;/th&gt;
  &lt;th&gt;P4KD5&lt;/th&gt;
  &lt;/tr&gt;";
  
  while ($row = mysql_fetch_array($sql))
  {
  $output .=  "&lt;tr&gt;&lt;td&gt;";
  $output .=  $row['ID'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['Project'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['Starter Project'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['Course'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['KDs completed in your course'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['Projects Completed'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['Project 1'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 1 KD 1'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 1 KD 2'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 1 KD 3'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 1 KD 4'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 1 KD 5'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['Project 2'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 2 KD 1'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 2 KD 2'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 2 KD 3'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 2 KD 4'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 2 KD 5'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['Project 3'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 3 KD 1'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 3 KD 2'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 3 KD 3'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 3 KD 4'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 3 KD 5'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['Project 4'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 4 KD 1'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 4 KD 2'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 4 KD 3'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 4 KD 4'];
  $output .=  "&lt;/td&gt;&lt;td&gt;";
  $output .=  $row['P 4 KD 5'];
  $output .=  "&lt;/td&gt;&lt;/tr&gt;";
  
  }
  $output .=  "&lt;/table&gt;";
  sendEmail($output);
  echo $output;
  return $output;
  
  
  }
  error_reporting(-1); // display all faires
  ini_set('display_errors', 1);  // ensure that faires will be seen
  ini_set('display_startup_errors', 1); // display faires that didn't born
  
  ?&gt;
  </code></pre>
  
  <p>Full email.php file:</p>
  
  <pre><code>  &lt;html&gt;
  &lt;head&gt;
  &lt;style&gt;
  body {
  background-color:#1C2932;
  }
  p {
  font-family: Helvetica;
  font-size: 18px;
  color: #989898;
  }
  
  &lt;/style&gt;
  &lt;/head&gt;
   &lt;body&gt;
  &lt;?php
  function sendEmail($table){
  $email = $_POST['send'];
  $headers = array(
  'From: summitmathguide@gmail.com',
  'Content-Type: text/html',
  'Content-Type: text/css'
  );
  $content = $table;
  
  mail($email,'HTML Email',$content,implode("\r\n",$headers));
  echo "&lt;p&gt;Email Sent!&lt;/p&gt;";
  }
  error_reporting(-1); // display all faires
  ini_set('display_errors', 1);  // ensure that faires will be seen
  ini_set('display_startup_errors', 1); // display faires that didn't born
  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>