Show user his products <p>This is my first year with HTML, PHP, JAVASCRIPT and mysql!</p> <p>And i am having a problem, im making a website that users can only see them products. For example: Admin created a product for MARTA, when MARTA log in she can see her product.</p> <p>I have created the table USER_EQUIPMENT but i don't know how can i use it like i want.</p> <p>I made something like this:</p> <pre><code>function getEquipment($name) { $query = "select * from equipments where name = '$name'"; $this-&gt;connect(); $res = $this-&gt;execute($query); $this-&gt;disconnect(); return $res; } </code></pre> <p>and then i called it like:</p> <pre><code>$name = $_SESSION['name']; include_once('DataAccess.php'); $da = new DataAccess(); $res = $da-&gt;getEquipment($name); </code></pre> <p>But i doesn't get the equipment by the name. Little help please?</p> <p>Thanks.</p>