473,800 Members | 2,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem display image through image path

93 New Member
[PHP]<td width="65" valign="top" width="65" height="44" border="1" vspace="2"><img src="<?php echo $row["imgSelectedPat h"];?>"></td>
<td width="195" class="eventEnt ryText" ><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 10914
jx2
228 New Member
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 Recognized Expert Top Contributor
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
pritipshah
11 New Member
[PHP]<td width="65" valign="top" width="65" height="44" border="1" vspace="2"><img src="<?php echo $row["imgSelectedPat h"];?>"></td>
<td width="195" class="eventEnt ryText" ><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 New Member
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
4458
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 menu to switch an image (actually to add rectangels offscreen and bring it to the front). The following codes runs properly. You just need to create a file images.properties and put some images in a folder called images. By the way this is...
6
2229
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 'manufacturers' and the display will then provide all the rest of the info from the other fields. I need to eliminate all the duplicates in the First Drop Down as it currently displays an entry for every record, many are identical, I might have over...
8
3402
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 it up as C:\domains\appA. Locally, my IIS root points to C:\domains. I don't point it to C:\domains\appA since if I have an appB under C:\domains I wouldn't be able to get to it. So to access it via my browser I go to localhost/appA.
5
5044
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 that calls the web service to render a vertical strip of images. After doing some research I am unable to find some vb.net code that can assist in what I want to achieve. The closest thing I found was
3
4119
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 it, which i didnt specify. Further to that, when I click it, it should lead straight into another site/window. But when i click it, another totally irrelevant image pops up. Its only when i click it again that it the link takes me to another site. ...
2
16690
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, one sub). That code is working properly. How do I get that to translate to my report? I use VBA code because I use formats other than BMP for the pictures. Would basing the form on the qury that the report is based on solve the issue without...
1
3380
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 image upload in database: -----------Upload.jsp---------------- <html> <head> <title>Account Details </title>
4
2111
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
8340
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 2.0.0.14 (Win-XP) - the image doesn't appear. The error console shows no errors and Page Info, under the media tab, shows no loaded image (in contrast to FF Mac which shows the image). The images I select are all jpegs, btw.
4
2771
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 = "~/images/" + myUploadControl.FileName; myUploadControl.SaveAs(filePath); I get an error about a rooted path:
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10274
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10251
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.