Jump to content

Echo An Image In Php From Local Directory


josephbupe

Recommended Posts

Hi,

 

In my learning process I am re-writing my code from mysql to mysqli. But I can not get my image to echo with the following code.

 

echo "<td valign=top>\n

<table width=150 border=1 align=left class=allborder> \n
<tr> \n
<td width=70>$row[1]</td> \n
</tr>\n

<tr> \n
	<td><img src=\"./images/$row[15]\" width=\"90\" height=\"120\" alt=\"\" /></a> \n
	</td>
</tr>\n

</table>\n</td>\n
 ";		

 

There is no error given.

 

The images are stored in a folder named "images" while their names (i.e. image1.jpg) are saved to the database. I have checked and the image field in on row number 15 as indicated.

 

How may I resolve this?

 

Joseph

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...