Skip to main content
Known Participant
Jun 17, 2009 12:55 PM UTC
Answered

showing images through recordset

well I have created a recordset and I have a row in it for images named visual and I want the images to be displayed on the pages dynamically the images will be displayed with respect to the id value got from the url

And i want the images to be of a specific dimension width=300 and height=200 can someone plz help me this is the code that I m using now but the problem is that the page only shows the alt text which in this case is Images.

     <img src=_post_images/"<?php echo $row_Recordset1['visual']; ?>" width="300" height="200" alt="Images" />

This topic is closed to new replies. Start a new post to keep the conversation going.
David_Powers
David_PowersCorrect answer
Inspiring
Jun 17, 2009 4:09 PM UTC

     <img src=_post_images/"<?php echo $row_Recordset1['visual']; ?>" width="300" height="200" alt="Images" />

The quotes in your src attribute are in the wrong place. Assuming the name of the folder where the image are kept is _post_images, your code should look like this:

<img src="_post_images/<?php echo $row_Recordset1['visual']; ?>"

width="300" height="200" alt="Images" />

2 replies

David_Powers
David_PowersCorrect answer
Inspiring
Jun 17, 2009 4:09 PM UTC

     <img src=_post_images/"<?php echo $row_Recordset1['visual']; ?>" width="300" height="200" alt="Images" />

The quotes in your src attribute are in the wrong place. Assuming the name of the folder where the image are kept is _post_images, your code should look like this:

<img src="_post_images/<?php echo $row_Recordset1['visual']; ?>"

width="300" height="200" alt="Images" />

Translate
adi3199Author
Known Participant
Jun 17, 2009 4:25 PM UTC

Thanks man thanks a lot it works great

Translate