Every time a POST value is not equal to the list of values set in an array will return: Undefined Index error, I made an if statement but is not working.
Here\'s the
You can just use a ?? to set set a default value if your value is not set.
??
$_POST['product'] ?? "No product";