Two things.
If you want to know if a supplied username and password match a row in the database, you don't need to ask for all rows where the username matches the supplied username, and the password matches the supplied password, and then look to see if the username matches the supplied username and the password matches the supplied password. The fact I said all that twice is a sign that you're doing the same thing twice.
The other thing is that your if/elseif cases are so similar it would make sense to have the computer go through them itself. The only bits that change are the bits based on the username, and the computer knows the username by this point.
By simplifying the code it becomes harder for bugs to hide.
So, starting from the query...
$result = mysql_query("SELECT COUNT(*) FROM ktl WHERE user_name='$user_name' AND passwrd='$res_pass'");
// COUNT because you don't need the actual data in the row, just whether there
// is a row there or not.
$result_count = mysql_result($result,0,0);
if($result_count>0) // A successful match against a database record.
{
echo "<br>
<table border=\"0\" align =\"center\">
<tbody>
<tr>
<td>You are authorized.</td>
</tr>
<tr>
<td>
<form action=\"$user_name/$user_name.php\" method=\"post\" />
<input type=\"hidden\" name=\"verify_$user_name\" value =\"ok\" />
<input type=\"submit\" value=\"Continue\" />
</td></tr></tbody></table>";
}
else
{
echo "<br>
<table border=\"0\" align =\"center\">
<tbody>
<tr>
<td>You are not authzed.</td>
</tr>
<tr>
<td>
<form />
<input type=\"button\" value=\"Back\" onclick=\"history.go(-1)\">
</td></tr></tbody></table>";
}