Skip to main content
Known Participant
May 19, 2012
Question

Images are not displaying(PHP MySQL)

  • May 19, 2012
  • 1 reply
  • 2310 views

Hi,

I've created a database table (MySQL) to store file path of images stored in a folder but the only problem is that the images are not displaying on the web page. Here's the procedure that I've used:

-Placed the cusor at the insertion point (div).

-Then selected 'Insert image' from the insert menu.

-Selected 'data sources' in the select image dialogue box.

-Selected the 'path' field in the recordset containing the image details of the images I want to display.

-Then OK.

Here's the code generated:

<td colspan="3" nowrap="nowrap"><img src="<?php echo $row_rsBanner['path']; ?>" width="950" height="141"/></td>

Here's the client side code generated:

<td colspan="3" nowrap="nowrap"><img src="C:/xampp/htdocs/Dirwebclient/banner3A_mod.png" width="950" height="141"/></td>

But the funniest thing is that if I pull the image as a background of the <td> (table data) it displays perfectly.

Here's the code:

<td colspan="3" nowrap="nowrap" background="<?php echo $row_rsBanner['path']; ?>" width="950" height="141"></td>

Can someone please give an idea of how I can pull the image using the <img> tag and not as a background.

This topic has been closed for replies.

1 reply

Community Expert
May 19, 2012

Can you post the page that is generated so we can see if this is a path issue or something else going on?

Known Participant
May 21, 2012

The page is still on the local server, no web server. It's just but a project for learning purposes.

Participating Frequently
May 21, 2012

Paste the source code from the browser into this thread.