just at quick glance:
You define your function, then you give the variable names using $_POST, but you refer to them in the function as $username and $password.
What you want to do is define that first line of your function like this
function user_login($username,$password)
Then to call it up, if the username and password variables are coming out of a form with a method of post, call it up like this
user_login($POST['username'], $POST['password']);
That way, $POST['username'] is in the $username spot in your function, and $POST['password'] is in the $password spot in your function.
Also
$feedback .= ' ERROR - You haven't Confirmed Your Account Yet ';
watch the apostrophe on haven't. You should escape it or use double quotes surrounding the string instead of single quotes.
Cgraz