title: password issue with database change
body: <p>I am changing my database to add an "sex" column and after, I can't log into the my site. So I look into the <code>get_passwd()</code> function, and I see <code>$passwd = $row[5]</code> is causing the problem. </p>
  
  <p>I fixed it, but is there better way to do this function, even if I adding column into the database?</p>
  
  <pre><code>function get_passwd($link, $login) {
      $sql = "SELECT * FROM user WHERE email='$login'"; 
      $result = mysql_query($sql, $link);
      $row = mysql_fetch_array($result);
      $passwd = $row[6];//this is the problem! 
      //echo $passwd;
      return $passwd;
  };
  </code></pre>