title: Add a product with details (name,quantity,multiple images) and retrieve them in another page
body: <p>Suppose I have a product table with attributes id, name, quantity, image, description. and I have another table image with attributes id, productId, imagepath.</p>
  
  <p>and I have a form like this</p>
  
  <pre><code>&lt;form method="post" action=""&gt; 
    &lt; input type="text" name="name" /&gt; 
    &lt; input type="text" name="quantity" /&gt; 
    &lt; input type="file" name="images[]"  multiple/&gt; 
    &lt; input type="text" name="description" /&gt; 
   &lt;/form&gt;
  </code></pre>
  
  <p>I just started learning PHP and I am not very proficient in using php and mysql  but I really wish to know how can I add a product with details(name, quantity, description) and two or more images to my database and Later on in another page retrieve the same product with details and the two or more images that belongs to this particular product. </p>
  
  <p>I don't really know if creating a product and an image table (the image table will get the productId and store imagepath for each upload) is the best way to solve it. 
  So I wish to find an easy or reliable way to do it and If you can, for example, illustrate with an example it will be of great help to me.
  Thanks in advance.</p>