I am working on college project and i am stuck at the moment.
I have a table and it have multiple records. Records are saved by user. I want to show all data stored by specific user on webpage (under a separate div). I am able to fetch all data from database by using below code.
$prj= mysql_query("select * from project where uid=$uid");
$record= mysql_fetch_assoc($prj);
$project_name = "$record['project_name']";
$short_dis= "$record['short_dis']";
$poster= "$record['poster']";
mysql_close($prj);
Here are some php code.
<div class="media services-wrap55 wow fadeInDown">
<img class="img-responsive" src="uploads/poster/photo-original_827156899.jpg"><br>
<a href="#"> <h4 class="media-heading">second project for testing</h4></a>
<p> by user</p>
<p> second project for testing second project for testing second project for testing second project for testing.</p>
<a class="" href="iska-link.html">More ... </a>
<p>
<div id="progressBar2" class="tiny-green"><div></div></div><p>
<div class="counter-inner"><div id=example1" data-countdown="07/02/2015 00:11:00"></div></div><p>
<div class="col-sm-11 text-right">
<div class="entry-meta">
<span><i class="fa fa-comment"></i><a href="comments"> 2 Comments </a></span>
<span><i class="fa fa-thumbs-up"></i><a href="#"> 56 </a></span>
<span><i class="fa fa-thumbs-down"></i><a href="#"> 56 </a></span>
<span><i class="fa fa-star"></i><a href="#"> 56 Fav </a></span>
</div>
</div>
</div>
</div>
As you can see these are static data. I want to put dynamic data from database in this.
Is there any advise how to get the data in div by loop.
I can show one record by using echo. I am not looking for entire code just wanted database part and some sample while using it in php.