title: how to link my database item to php?
body: <p>i'm currently stuck because i have no idea hot to insert my database item to be displayed on my php. Need help. Im a php beginner.</p>
  
  <p>database</p>
  
  <pre><code>&lt;?php
  $con=mysqli_connect("localhost","root","","account");
  // Check connection
  if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  $sql="SELECT * FROM product";
  $row = mysql_fetch_assoc($sql);
  ?&gt;
  </code></pre>
  
  <p>index.php  </p>
  
  <pre><code>&lt;div class="col-sm-6 col-md-4"&gt;
  &lt;div class="thumbnail"&gt;
  &lt;img src="&lt;?php echo $row['product_img_name']; ?&gt;" alt=""&gt;
  &lt;div class="add-to-cart"&gt;
  &lt;a href="#" class="glyphicon glyphicon-plus-sign" data-toggle="tooltip" data-placement="top" title="Add to cart"&gt;&lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="caption"&gt;
  &lt;h4 class="pull-right"&gt;&lt;?php echo $row['price'];?&gt;&lt;/h4&gt;
  &lt;h4&gt;&lt;a href="product.html"&gt;&lt;?php echo $row['product_name'];?&gt;&lt;/a&gt;&lt;/h4&gt;
  &lt;p&gt;&lt;?php echo $row['product_desc'];?&gt;&lt;/p&gt;   
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;      
  </code></pre>