Cannot modify header information
<p>My problem is that I have a class with a function inside of it, and I get;</p>

<pre><code>Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/inc/class.php:105) in /home/user/public_html/inc/facebook/login.php on line 21
</code></pre>

<p>When the page I'm using it on redirects a user with the header(); tag. The class is;</p>

<pre><code>class mysql {
private $user;
private $pass;
private $db;

public function __construct($user1, $pass1, $db1) {
    $this-&gt;user = $user1;
    $this-&gt;pass = $pass1;
    $this-&gt;db = $db1;
    $this-&gt;connect();
}

public function connect() {
    $this-&gt;connection = mysql_connect('localhost', $this-&gt;user, $this-&gt;pass);
    $select = mysql_select_db($this-&gt;db, $this-&gt;connection);
}

public function query($x) {
    return mysql_query($x);
}

public function fetch($x) {
    return mysql_fetch_array($x);
}

public function num($x) {
    return mysql_num_rows($x);
}
}
</code></pre>

<p>Line 105 is the;</p>

<pre><code>return mysql_fetch_array($x);
</code></pre>

<p>And the file trying to do the header redirect just includes this file at the top of the page and does the header lower down.</p>

<p>Thanks in advance.</p>
