You mistake when you select
& join clause
the table
column name. It should be appears first table name
than column name like this.
$sql = "SELECT products.product_title, cart.qty FROM products INNER JOIN cart ON products.product_id = cart.p_id";
More about join
:
MySQL join