You need to post the error for more details. But a few things I noticed was
mysql_query("SELECT * from users where user_name == ($_POST['user_name']) and ($_POST['password']) and ($_POST['user_type'])")
You need to change this to
//do escaping here. See note below.
$username = isset($_POST['user_name']) ? mysql_real_escape($_POST['user_name']) : '';
$pass = isset($_POST['password']) ? mysql_real_escape($_POST['password']) : '';
$type = isset($_POST['user_type']) ? mysql_real_escape($_POST['user_type']) : '';
mysql_query("SELECT * from users where user_name = '{$username}' AND password = '{$pass}' AND user_type = '{$type}'")
You need to escape values
MySQL comparisons are =
and not ==
(thanks for pointing that out @jeremysawesome)
You need to check the column against your POST value
You also have an SQL injection vulnerability. Please at least use mysql_real_escape. Better yet, switch to PDO
You need to assign your isset
check to a variable and check it. Otherwise it's just a waste.