Can you show us the code that actually appears in the browser as that will give more of a clue as to why you're having troubles.
Firefox vs Micro$oft Internet Explorer and PHP
Sure, this is the code that appears in the browser:
<p><a href="getprod.php?prodid=1">creatorscap<br><a href="getprod.php?prodid=1"></a><br><img src="C:\wamp\www\website\cat\03.jpg">
<br>Our adjustable, 100% brushed cotton Cap is unstructured and an ideal way to beat the heat. Wear it anytime you want to keep the sun off or cover up a bad hair day. It features a sturdy low profile brim, sweatband, and adjustable closure, as well as Premium Printing for images that last.<br>
<b>£9.99</b>
<p><a href="getprod.php?prodid=2">tshirt<br><a href="getprod.php?prodid=2"></a><br><img src="C:\wamp\www\website\cat\01.jpg">
<br>Look cool without breakin’ the bank. Our durable, high-quality, 100% cotton Hanes Heavyweight is our Value T. It's what to wear when you want to go comfortably casual. Preshrunk, durable and guaranteed.<br>
<b>£9.99</b>
<p><a href="getprod.php?prodid=3">schoolbag<br><a href="getprod.php?prodid=3"></a><br><img src="C:\wamp\www\website\cat\02.jpg"><br>From school, to carrying your laptop, to a hip alternative diaper bag, our versatile, spacious messenger bag is practically all you need to get you through every stage of your life and look hip doing it.<br>
<b>£15.99</b></blockquote>
The url for the pictures seems to be right... dont know what might be the problem.
Can you bring the image up in FF if you type the path to it directly in the address box?
Possible thing you could try to fix this- make sure that "for the originating web site only" tickbox isn't ticked in the Options > Content > Load images section.
Ive checked the "for the originating web site only" is unticked but i can load the image in the browser by inputting the url manually.
Would the back slash in the url rather than a forward slash make a difference? I have noticed that in the database the image urls are defined as:C:\wamp\www\website\cat\01.jpg
If you're linking to your harddrive (C:\folder\folder\image.jpg) IE needs file:/// in front of it, to make it file:///C:\folder\folder\image.jpg
Don't ask me why.
I don't run my own server so I've not tried it - certainly you'd expect stuff on an external site to have forward slashes rather than backslashes so that might well be the culprit.
Here's a link to a Firefox extension which will sort it all out for you hopefully: http://gemal.dk/mozilla/slashy.html
ive installed slashy... but it doesnt seem to have worked.
really confused as to what may be causing the problem.
hhhmmm firefox also seems to add file:/// to the start of the image when i requst only the image to be loaded in the browser. Perhaps if i add 'file:///' in the database it may work?
Worth a try?
nope... didnt work
aha..... when i right click on the missing image space and click 'view image' it seems to bring up the image fine.....
dont understand this.......
It's probably a security thing to prevent webpages from bringing up images from your hard-drive.
Try using relative paths instead.
Can you provide a link to a tutorial or something on 'relative paths'?
My take is that the src attribute of img requires a URI, but you provide a file path instead.
Place the image in your web directory, then use a relative URI, since that is what you would use on a production website. If you insist on an absolute URI, use http://localhost
<a href="getprod.php?prodid=1">creatorscap<br><a href="getprod.php?prodid=1"></a><br><img src="C:\wamp\www\website\cat\03.jpg">
Look what I made red, that could be why
You never closed the first anchor and went right into a second anchor, that might be cauing code conflict
But this is automated-generated code.
Even once corrected
<a href="getprod.php?prodid=1">creatorscap</a><br><a href="getprod.php?prodid=1"></a><br><img src="C:\wamp\www\website\cat\03.jpg">
The problem still exists...
If you're using WAMP, then you're running a server on your machine, right? If so, you shouldn't be referencing your harddrive at all. You should be referencing the file relatively.
If your root is at c:\wamp\www then you'd use:
<img src="/cat/01.jpg" alt="myImage" />Firefox has a security restriction that remote content may not include or link to local content. This is to prevent potential security problems with client-side code being able to detect things like the existence of local files, and exploits like c:/con/con (Windows 9x, hangs the machine).
This is a feature not a bug.
You would not want to use <img src="file://c:/blah.jpg"> in a real web site, so it is not a problem. You shouldn't link to local images, instead you should place them on the web server and access them through that. That will work fine.
Besides which, c:\blah.jpg is a valid relative URL, not a local path.
Mark
Besides which, c:\blah.jpg is a valid relative URL, not a local path.
As far as I can tell it isnt, at least according to [url=ftp://ftp.rfc-editor.org/in-notes/rfc3986.txt]RFC 3986[/url], unless you want to take it out of context (i.e. if we arent dealing with a file named "blah.jpg" on a MS Windows filesystem with a drive named "C").