simple php function
<p>I wanna be able to get everything from a signed in user. Like, username, email, msn, and alto more with a function like:</p>

<pre><code>echo getUserInfo('email');
</code></pre>

<p>gets the content of "email". but it does not work, see below:</p>

<p>My function:</p>

<pre><code>function getUserInfo($field) {

global $userID;

    $sql = mysql_query("select * from users where id = $userID");
    mysql_result($sql, 0, "$field");

   return $field;

}
</code></pre>

<p>Does not work, it outputs whatever i put in the function when i call it</p>
