Assuming you want to compare the values and not assign them, you want to use "==" instead of "=". That being the case, it would be:
if ($_POST['uname'] == $username && $_POST['pword'] == $password)
Also, I prefer to always use braces around the if/else clauses even if not required (when only one line) just for consistency and in case I ever add a line later:
if ($_POST['uname'] = $username && $_POST['pword'] = $password) {
echo "Access Granted!"
}
else {
echo "Access Denied!";
}
Oh, and associative array keys should be quoted when using a string literal, otherwise you're using a constant (which may work but can lead to nasty bugs later).