I have this PHP code:
$supplier = $line[2];
if ($supplier == "supplier")
{
} else {
Header("Location: premium.php");
}
Now I want that to include $supplier == “demo” to the PHP code to be as follows:
$supplier = $line[2];
if ($supplier == "supplier" && $supplier == "demo")
{
} else {
Header("Location: premium.php");
}
but the latter code is not working for either… I mean if the $supplier is equal to something else besides “supplier” or “demo” it is still bypassing it. It only worked for the first one.
How can I arrange it please?
can never be true, since the $supplier can never be both at same time. You need an OR there like so: