title: Undefined index
body: <p>I am getting this error:</p>
  
  <pre><code>Notice: Undefined index: kolebro in /Applications/MAMP/htdocs/includes.php on line 12
  </code></pre>
  
  <p><strong>function.php</strong></p>
  
  <pre><code>public function User_Details($uid) 
  {
      $username = mysql_real_escape_string($uid);
      $query = mysql_query("SELECT uid, username, sansiti, kolebro AS full_name FROM users WHERE uid = '$uid' AND status = '1'") or die(mysql_error());
      $data = mysql_fetch_array($query);
      return $data;    
  }
  </code></pre>
  
  <p><strong>includes.php</strong></p>
  
  <pre><code>$session_data = $Wall-&gt;User_Details($uid);
  $session_sansiti = $session_data['sansiti']; // &lt;== Line 12
  $session_kolebro = $session_data['kolebro'];
  </code></pre>
  
  <p><strong>index.php</strong></p>
  
  <pre><code>&lt;?php echo $session_kolebro; ?&gt;
  &lt;?php echo $session_sansiti; ?&gt;
  </code></pre>
  
  <p>Can anyone help me understand (what is causing) this error?</p>