
<form name="form1" method="post" action="index.php">

                
  <table cellspacing="1" cellpadding="2" border="0" bordercolor="#F9F9F9" bgcolor="#FFFFFF" align="center">
        <tr bgcolor="#EEEEEE"> 
          <td bgcolor="#EEEEEE">Username</td>
          <td>
                <input type="text" name="un" size="15">
          </td>
        </tr>
        <tr bgcolor="#FCFCFC"> 
          <td> 
                <div align="center">Password</div>
          </td>
          <td>
                <input type="text" name="pw" size="15">
          </td>
        </tr>
        <tr bgcolor="#FCFCFC"> 
          <td colspan="2"> 
                <div align="right">
                  <input type="hidden" name="auth" value="auth">
                  <input type="submit" name="Submit" value="Submit">
                </div>
          </td>
        </tr>
  </table>
          </form>
<?php

$SQL = "SELECT * from CLIENTS WHERE USERNAME = '$unn' AND CPW ='$pww'";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
$username = $row["USERNAME"];
$password = $row["PASSWORD"];}

$check = "$username$password";

IF (empty($check)){$y = 'no';}else{$y = 'yes';}

?>
