title: Call to undefined function when called
body: <p>Here is the error:</p>
  
  <p>Fatal error: Call to undefined function get_page_by_id() in file.php on line 13</p>
  
  <p>Here is the code calling the function:</p>
  
  <pre><code>&lt;?php 
  require_once("includes/connect.php"); 
  include("includes/functions.php"); 
  ?&gt;
  &lt;?php 
  if (isset($_GET['info'])){
      $sel_table1 = get_info_by_id($_GET['info']);
      $sel_t2 = 0;
      $table2 = NULL;
  } elseif (isset($_GET['page'])){
      $table1 = 0;
      $sel_table1 = NULL;
      $table2 = get_page_by_id($_GET['page']);
  } else {
      $table1 = 0;
      $sel_table1 = NULL;
      $table2 = 0;
  }
  
  ?&gt;
  </code></pre>
  
  <p>And here is my functions.php code for this function:</p>
  
  <pre><code>   function get_page_by_id($page_id){
          $query = "SELECT *";
          $query .= " FROM pages ";
          $query .= " WHERE id=" . $page_id;
          $query .= " LIMIT 1";
          $result_set = mysql_query($query);
          confirm_query($result_set);
          if ($page = mysql_fetch_array($result_set)){
          return $page;
      } else {
          return NULL;
      }
      }
  </code></pre>
  
  <p>I have no idea what to even think lol. This happens when the functions and variables for that function are true.</p>
  
  <p>Thanks</p>
  
  <p>UPDATE: here is my full functions.php:</p>
  
  <pre><code>&lt;?php
  
      function confirm_query($result_set){
          if(!$result_set){
              die("Could not connect to database.");
          }
      }
  
      function get_all_info(){
          $result = mysql_query("SELECT * FROM information ORDER BY position ASC");
          confirm_query($result);
          return $result;
      }
      function get_pages_for_info($information_id){
          $result2 = mysql_query("SELECT * FROM pages WHERE information_id ={$information_id} ORDER BY position ASC");
          confirm_query($result2);
          return $result2;
      }
  
      function get_info_by_id($information_id){
          $query = "SELECT * ";
          $query .= "FROM information ";
          $query .= "WHERE id=" . $information_id;
          $query .= " LIMIT 1";
          $result_set = mysql_query($query);
          confirm_query($result_set);
          if ($info = mysql_fetch_array($result_set)){
          return $info;
      } else {
          return NULL;
      }
  }
  
  
      function get_page_by_id($page_id){
          $query = "SELECT *";
          $query .= " FROM pages ";
          $query .= " WHERE id=" . $page_id;
          $query .= " LIMIT 1";
          $result_set = mysql_query($query);
          confirm_query($result_set);
          if ($page = mysql_fetch_array($result_set)){
          return $page;
      } else {
          return NULL;
      }
      }
  ?&gt;
  </code></pre>