Re: Retrieving Image Location in MySQL
| From: | Joao Gomes Madeira | Date: | Sat, 07 Mar 2009 10:08:08 +0000 |
| Subject: | Re: Retrieving Image Location in MySQL | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-46048@lists.php.net to get a copy of this message | ||
Hello again Sashi
The answer provided by Mushin won't work because images are not
acessible from the outside. You can't have
<img src="C:\Users\Sashikanth\Desktop\Bldgs_lots\Burruss.jpg" ...>
because that's not a valid URL...
You can have something like
<img src="Bldgs_lots/Burruss.jpg" ...>
which when interpreted by the browser will become something like
http://yoursite/Bldgs_lots/Burruss.jpg
Now, for this to happen you need to have Bldgs_lots as a subfolder or
alias for your site.
Otherwise, there is the way I mentioned in the first place, involving a
php script just to get the image, which has to be called from within
your script, passing it the info from the database
echo '<img src="picture.php?&img=' . $location . '"
border="1" height="150" width="200"
alt="' . $build . '">';
Now, I don't recommend passing local paths like this to scripts ...
Hope this helps
C ya
JP