così?

codice:
$sql=$db->prepare("SELECT * FROM utente WHERE email = :email AND password = :password");
$sql->execute(array(':email'=>$email,':password'=>$password));
$res = $sql->fetchAll();
if($sql->rowCount() > 0){
    header("Location:profilo.php?id=".$res['id']);
}