php, mysql Db with unittesting
<p>i have a class in login page for check the user, here how can i implement the unit testing?
This is my login page php code:</p>

<pre><code>class login {
function checkuserlogin() {


      $username = $_REQUEST['username'];
      $pwd = $_REQUEST['pwd'];

    $result = mysql_query($selQry);
    $resultset = mysql_num_rows($result);

    while($row = mysql_fetch_array($result))
      {

            if(($row['username']==$username &amp;&amp; $row['password']==$password )|| ($row['email'] == $username &amp;&amp; $row['password']==$password)) {
              do.. codes
            }

            else {
                                do.. codes
            }

          } 

   }
</code></pre>

<p>}</p>

<pre><code>$login = new login();
$login-&gt;checkuserlogin();
</code></pre>

<p>Help me,
Thanks in advance.</p>
