Random Image with subtitle in a table cell

images php coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Thu Jun 16, 2011 5:09 pm

Random Image with subtitle in a table cell

Postby BigOldSofty » Thu Jun 16, 2011 5:43 pm

I have a website for a camera club operating at present. On some pages it displays members images in a <td> as follows.

<td align="center">
<div><br /><img class="border" alt="" src="images/gallery/WallacesHut.jpg" width="790" height="396" /></div>
<p class="ncctext"><b>&quot;Wallace's Hut&quot;</b>&nbsp;&nbsp;&nbsp;<small>- Wolfram Steinke ©</small></p>

What I would like to do is generate the highlighted code with PHP so image would be a random selection from a folder. The title and photographer are embedded in the images EXIF and the width and height should also be obtained from the image. The only input parameter I would like to use is the relative path to the image folder so that the same code can be called from a number of places and point to a different set of images.
At present I'm even having difficulty putting simple PHP at that location which just displays a text message. The area comes out blank.
I'm new to PHP so it's most likely just a stupid mistake.

Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest