You mean you want to check if the $user is 1 and $data is 1, or if $user is 2 and $data is 2? That's different - as it is you're just looking to see if $user is nonempty/nonzero.
Is this more what you mean?
if ($user==1 && $data == "1"){
header ('Location:name.php');
} elseif ($user==2 && $data== "2"){
header ('Location:article.php');
} else {
header ('Location:add.php');
}
As before, "&&" or "and" work equally well here.