Hi, I am trying to design a dynamic website with a content management system and i was wondering what would be the best way to add content such as a photo gallery etc to the dynamic pages.
This is a general question but i will explain the problem i am having. I downloaded a script which allows me to add a photo gallery and i have included this at the top of the original page. I also have a php script which allows me to upload images, create a thumbnail and adds the name of both to a databse.
So far i have been adding the code to display the gallery to the database through the CMS and it displays ok apart from there is only one image and when i add a do while statement the other code remains but this statement is removed whenever i check it again. This is the code i have added:
<div class="ad-gallery">
<div class="ad-image-wrapper" style="text-align: center;">
</div>
<div class="ad-controls" style="text-align: center;">
</div>
<div class="ad-nav">
<div class="ad-thumbs">
<ul class="ad-thumb-list">
<?php do { ?> //this line is removed
<li style="text-align: center;"><a href="images/<?php echo $image['image']; ?>"> <img src="images/thumbs/thumb_<?php echo $image['image']; ?>" /> </a></li>
<?php } while ($row_image = mysql_fetch_assoc($image)); ?> // this line is removed
</ul>
</div>
</div>
</div>
I'm sure there should be a better way then adding the code through the database but i have never built a website this way before and i cant seem to find any specific information explaining in more detail the correct way. Can anyone help me?