Fadi946
Power Member
- Mar 25, 2009
- 621
- 93
Hey guys so I'm trying to make a list of books in my website (getting them from my database), and I succeded to put them but they are displaying one under the other... and I want to put them side by side.
Just in case you didn't understand me, I will give you an example:
What I have now is:
Book1
Book2
book3
What I want to do is:
Book1 -> Book2 -> Book3
This is my code:
I've tested many way to do it, and I noticed that the problem is the "while".. because without it, it will be good... but I really need this while loop.
Anyone can help me please? Its for my final project and I will gladly appreciate your help
Thanks!
-Fadi
Just in case you didn't understand me, I will give you an example:
What I have now is:
Book1
Book2
book3
What I want to do is:
Book1 -> Book2 -> Book3
This is my code:
PHP:
include 'DBConnection.php';
$ShowTopic = 'SELECT * FROM Books WHERE age = "Children"';
$Topicquery = mysql_query($ShowTopic);
while($DisTopic=mysql_fetch_array($Topicquery)){
?>
<div class="new_products">
<div class="new_prod_box">
<a href="details.php?book=<?php echo $DisTopic['getTitle']?>"><?php echo $DisTopic['Title'];?></a>
<div class="new_prod_bg1">
<a href="details.php?book=<?php echo $DisTopic['getTitle']?>"><img src="<?php echo $DisTopic['Image'];?>" alt="" width="98" height="150" title="" class="thumb" border="0" /></a>
</div>
</div>
</div>
<?php
}
?>
I've tested many way to do it, and I noticed that the problem is the "while".. because without it, it will be good... but I really need this while loop.
Anyone can help me please? Its for my final project and I will gladly appreciate your help
Thanks!
-Fadi