because this first line:
$POST['uname'] = strtolower($POST['uname']);
is not making sense
$POST['uname'] cannot be made equal to strtolower($POST['uname']);
it IS the posted value
so when you do
$query = mysql_query("SELECT uname FROM user WHERE uname='$POST[uname]' AND pword='$POST[pword]'")
it is using the POST value and not your strolower conversion