I am getting the following warning when trying to add data to a session (and checking if it already exists).
Warning: in_array() expects parameter 2 to be
Your $_SESSION['product'] is empty. Try this,
$_SESSION['product']
if(!empty($_SESSION['product']) && isset($_GET['product']) && !in_array($_GET['product'], $_SESSION['product'])){ $_SESSION['product'][] = $_GET['product']; }
It should work.