title: PHP & PDO PHP Notice: Undefined property: Database::$photo?
body: <p>Okay so here is the code that I am using</p>
  
  <pre><code>    function AddProducts($aTitle, $aDescription, $aPrice, $aQty, $aPhoto)
      {
  
          try {
              $stmt = $this-&gt;pdo-&gt;prepare("INSERT INTO products(title, price, description, qty, photo) VALUES(:title, :price, :description, :qty, :photo)");
              if(!$stmt){
                  $err = $this-&gt;pdo-&gt;errorInfo();
                  throw new RuntimeException('PRODUCT INSERT FAILED: '.$err[2]);
              }
              $stmt-&gt;bindValue(':title', $this-&gt;title, PDO::PARAM_STR);
              $stmt-&gt;bindValue(':description', $this-&gt;description, PDO::PARAM_STR);
              $stmt-&gt;bindValue(':price', $this-&gt;price, PDO::PARAM_INT);
              $stmt-&gt;bindValue(':qty', $this-&gt;qty, PDO::PARAM_INT);
              $stmt-&gt;bindValue(':photo', $this-&gt;photo, PDO::PARAM_STR);
              $stmt-&gt;execute();
          }catch (PDOException $e) {
              echo $e-&gt;getMessage();
          }
  
  
      }
  
  $addProducts = $database-&gt;AddProducts('Ford Mustang', 'This is a Descriptiom', 299.99, 1, 'images/includes/5.jpg');
  </code></pre>
  
  <p>The database class and database call function work. Also if you spot anything that could be improved, please point it out as I am trying to learn.</p>