473,322 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Problem display image through image path

93
[PHP]<td width="65" valign="top" width="65" height="44" border="1" vspace="2"><img src="<?php echo $row["imgSelectedPath"];?>"></td>
<td width="195" class="eventEntryText" ><b><? echo " SHOT : $shotNumber";?><br /></td>[/PHP]

Hi
I want to display jpeg image stored in a databse but have problem the image does not display. only show shotnumber. What is wrong with the first line of code? The code can display list of shots from table but the jpeg does not appear.

This are fields in my table.
imgSelectedPath =C:\..\..\..\..\
imgSelected Keyframe = C:\..\..\..\..\keyfrm.jpg
Aug 24 '07 #1
4 10883
jx2
228 100+
we need to know more about your script
is that file name(path) you store in mysql?
or jpegs binary?
what about you mysll query?

if you trying to display binary this way it wont work

regards jx2
Aug 24 '07 #2
ak1dnar
1,584 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. C:\..\..\..\..\keyfrm.jpg
Why you using this way of path? instead you can use the relative path for the image. but are you hosting this images in the table, in binary format or is it just the name on the table?
Aug 31 '07 #3
[PHP]<td width="65" valign="top" width="65" height="44" border="1" vspace="2"><img src="<?php echo $row["imgSelectedPath"];?>"></td>
<td width="195" class="eventEntryText" ><b><? echo " SHOT : $shotNumber";?><br /></td>[/PHP]

Hi
I want to display jpeg image stored in a databse but have problem the image does not display. only show shotnumber. What is wrong with the first line of code? The code can display list of shots from table but the jpeg does not appear.

This are fields in my table.
imgSelectedPath =C:\..\..\..\..\
imgSelected Keyframe = C:\..\..\..\..\keyfrm.jpg

Hi There,

When you write like these
Expand|Select|Wrap|Line Numbers
  1. <img src="<?php echo $row["imgSelectedPath"];?>">
  2.     it will start Quote frpm "<? and ends to $row[", again starts at "]; at ends to ?>" 
  3.  
so it will give error so try below insted of this
Expand|Select|Wrap|Line Numbers
  1. <?php $ImgValue = $row["imgSelectedPath"]; ?>
  2.     <img src="<?php print $ImgValue; ?>">
  3.  
And if possible try to store only Image Name in your database.

Regards,
Priti Shah
Sep 1 '07 #4
nma
93
Hi There,

When you write like these
Expand|Select|Wrap|Line Numbers
  1. <img src="<?php echo $row["imgSelectedPath"];?>">
  2.     it will start Quote frpm "<? and ends to $row[", again starts at "]; at ends to ?>" 
  3.  
so it will give error so try below insted of this
Expand|Select|Wrap|Line Numbers
  1. <?php $ImgValue = $row["imgSelectedPath"]; ?>
  2.     <img src="<?php print $ImgValue; ?>">
  3.  
And if possible try to store only Image Name in your database.

Regards,
Priti Shah

thanks ...Priti Shah
Sep 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: David | last post by:
Hello I'm writting an apllication and i like to display and offscreen image. However my code doesn't seem to work. It compiles and runs properly but What i want is to associate the button of the...
6
by: Kingdom | last post by:
I'm using this script to dynamicaly populate 2 dropdowns and dispaly the results. Choose a component type from the first drop down, lets say 'car' and the second box will list all the car...
8
by: nick | last post by:
I have a problem and I've been using a cheezy work around and was wondering if anyone else out there has a better solution. The problem: Let's say I have a web application appA. Locally, I set...
5
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page...
3
by: modermo | last post by:
Hey new to javascript figuring out how to fix this darn problem. I employ an image rollover, and it works beautifully in safari. But in firefox, the image has an annoying blue border around...
2
by: smorrison64 | last post by:
I have a form that is coded to open a File Dialog boc to pick a picture to display on that particular item on a subform. My form is not based on query, but rather two separate tables (one primary,...
1
by: amritranjan | last post by:
How to retrive image file from MS access database and display this in another JSPpage -------------------------------------------------------------------------------- This is my Jsp code for...
4
by: =?Utf-8?B?Qkw=?= | last post by:
I am in a problem to access user control(.ascx) on a .aspx page the following is my scenario I have following directory structure - Autoboom - workshop -- WSFirst -showroom
2
by: Tim Streater | last post by:
The following test page is intended to allow the user to choose an image file, and then display it. It works as expected in Safari 3.1.1, FF 2.0.0.14 (Mac), and IE7 (XP). But, it fails in FF...
4
by: jphaycock | last post by:
Hi I have a webform in a sub folder called admin. The form has a file upload control on it. I'm trying to upload an image file to the root images folder of the app like this: filePath =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.