$query = 'SELECT * FROM user where user_code='.$pdt[6];
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$row = mysql_fetch_array($result);
if ((mysql_num_rows($result) > 0) AND ($row['user_type'] == "Admin"))
{
Do some staff
} else {
echo "You must be System Administrator in order to enter this page. <br> <br>";
}