What Larry means is confirm that your $un, $e and $p variables are actually being assigned values from the form by using "echo" or "print" to output these variable values to the screen .... (i.e echo $un ) to dispay the value assigned to the $un variable ....
As far as your last error I believe you may be missing the "AND" in the WHERE clause of the sql statement:
SELECT user_id FROM users WHERE username='Frostbite' AND email='example@thisaddress.com'
-Randy