The page works fine when I update the rs_products and rs_type recordsets but it throws the following error when I amend and the rs_ATC recordset:
Notice: Undefined variable: rsViewedProducts in C:\xampp\htdocs\dmbc\categories.php on line 32
Fatal error: Call to a member function bindParam() on null in C:\xampp\htdocs\dmbc\categories.php on line 32
I tried wrapping the recordset in an if statement to ensure that the form had posted. In the case the page loads no problem but then throws the error after I click a couple of products and then add them to the cart.
Update page attached.