Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-10 Thread haliphax
On Mon, Mar 9, 2009 at 8:43 PM, Sashikanth Gurram sashi...@vt.edu wrote: Is there any way in which I can assign a variable to a query string? Like for example, Let us say that there are two php files a.php and b.php. I am currently using a image tag like img src=imgtest.php?id=Williams Hall /

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-10 Thread Sashikanth Gurram
haliphax wrote: On Mon, Mar 9, 2009 at 8:43 PM, Sashikanth Gurram sashi...@vt.edu wrote: Is there any way in which I can assign a variable to a query string? Like for example, Let us say that there are two php files a.php and b.php. I am currently using a image tag like img

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Sashikanth Gurram
Hi Nathan, Thanks a lot for the suggestion. It is working fine for an example code I have used to test it. The code I have written after your suggestion is as follows. ?php $location=C:\wamp\bin\apache\apache2.2.8\htdocs\Bldgs_lots\SQUIRES.jpg; header('Content-Type: image/jpeg');

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Sashikanth Gurram
Hi Nathan, Thanks a lot for the suggestion. It is working fine for an example code I have used to test it. The code I have written after your suggestion is as follows. ?php $location=C:\wamp\bin\apache\apache2.2.8\htdocs\Bldgs_lots\SQUIRES.jpg; header('Content-Type: image/jpeg');

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread haliphax
On Mon, Mar 9, 2009 at 1:29 AM, Sashikanth Gurram sashi...@vt.edu wrote: Hi Nathan, Thanks a lot for the suggestion. It is working fine for an example code I have used to test it. The code I have written after your suggestion is as follows. ?php

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Nathan Nobbe
On Sun, Mar 8, 2009 at 11:29 PM, Sashikanth Gurram sashi...@vt.edu wrote: Hi Nathan, Thanks a lot for the suggestion. It is working fine for an example code I have used to test it. The code I have written after your suggestion is as follows. ?php

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Sashikanth Gurram
Hi, Yes, the problem was solved, but It did not work fine when I used the same code in my larger file. Now it makes sense. Let me just repeat what you have said just to make sure that I did not misread you. So you say that the solution to this problem is to create another php file with the

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Virgilio Quilario
I am using a WAMP server for my coding purposes. My MySQL Version is 5.0.51b, PHP version is 5.2.6 and Apache version is 2.2.8 I have created a database with one of the tables containing a location of the image. Using PHP I am trying to retrieve the location of the image (from the mysql db)

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread haliphax
On Mon, Mar 9, 2009 at 9:32 AM, Sashikanth Gurram sashi...@vt.edu wrote: On Mon, Mar 9, 2009 at 1:29 AM, Sashikanth Gurram sashi...@vt.edu wrote: Hi Nathan, Thanks a lot for the suggestion. It is working fine for an example code I have used to test it. The code I have written after your

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Nathan Nobbe
On Mon, Mar 9, 2009 at 7:32 AM, Sashikanth Gurram sashi...@vt.edu wrote: Hi, Yes, the problem was solved, but It did not work fine when I used the same code in my larger file. Now it makes sense. right, just track down where you started sending the output, and remember if youre going to use

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Sashikanth Gurram
Hi, Thanks a lot for all the patient replies. All the suggestions led me in a positive direction. Finally, instead of using the header() in my main PHP file (with HTML tags), I have used it in a secondary file and called it using a tagimg src=imgtest.php. It is working fine. But, the image I

RE: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Bob McConnell
From: Sashikanth Gurram Hi, Thanks a lot for all the patient replies. All the suggestions led me in a positive direction. Finally, instead of using the header() in my main PHP file (with HTML tags), I have used it in a secondary file and called it using a tagimg src=imgtest.php. It is

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread haliphax
On Mon, Mar 9, 2009 at 10:24 AM, Sashikanth Gurram sashi...@vt.edu wrote: Nathan Nobbe wrote: On Mon, Mar 9, 2009 at 7:32 AM, Sashikanth Gurram sashi...@vt.edu mailto:sashi...@vt.edu wrote:    Hi,    Yes, the problem was solved, but It did not work fine when I used    the same code in my

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Sashikanth Gurram
Thanks a lot everyone, particularly Haliphax, Nathan, Virgilio and Bob. I will try it and will come back to you. Thanks, Sashi haliphax wrote: On Mon, Mar 9, 2009 at 10:24 AM, Sashikanth Gurram sashi...@vt.edu wrote: Nathan Nobbe wrote: On Mon, Mar 9, 2009 at 7:32 AM, Sashikanth

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread haliphax
On Mon, Mar 9, 2009 at 10:52 AM, Sashikanth Gurram sashi...@vt.edu wrote: haliphax wrote: On Mon, Mar 9, 2009 at 10:24 AM, Sashikanth Gurram sashi...@vt.edu wrote: Nathan Nobbe wrote: On Mon, Mar 9, 2009 at 7:32 AM, Sashikanth Gurram sashi...@vt.edu mailto:sashi...@vt.edu wrote:   Hi,

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Sashikanth Gurram
haliphax wrote: On Mon, Mar 9, 2009 at 10:52 AM, Sashikanth Gurram sashi...@vt.edu wrote: haliphax wrote: On Mon, Mar 9, 2009 at 10:24 AM, Sashikanth Gurram sashi...@vt.edu wrote: Nathan Nobbe wrote: On Mon, Mar 9, 2009 at 7:32 AM, Sashikanth Gurram sashi...@vt.edu

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Shawn McKenzie
Sashikanth Gurram wrote: haliphax wrote: On Mon, Mar 9, 2009 at 10:52 AM, Sashikanth Gurram sashi...@vt.edu wrote: haliphax wrote: On Mon, Mar 9, 2009 at 10:24 AM, Sashikanth Gurram sashi...@vt.edu wrote: Nathan Nobbe wrote: On Mon, Mar 9, 2009 at 7:32 AM,

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Sashikanth Gurram
Hi, Worked perfectly. Thank you very much. -Sashi Dollah Ihsan wrote: Hi, you are using single quotes like this? echo ' img src=imgtest.php?id=$building /'; single quotes will ignore that $building variable. Just concatenate it: echo 'img src=imgtest.php?id=' . $building . ''; or use

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Sashikanth Gurram
Thanks Shawn and Dollah -Sashi Shawn McKenzie wrote: Sashikanth Gurram wrote: haliphax wrote: On Mon, Mar 9, 2009 at 10:52 AM, Sashikanth Gurram sashi...@vt.edu wrote: haliphax wrote: On Mon, Mar 9, 2009 at 10:24 AM, Sashikanth Gurram sashi...@vt.edu wrote:

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-07 Thread Nathan Nobbe
On Sat, Mar 7, 2009 at 7:10 PM, Sashikanth Gurram sashi...@vt.edu wrote: Hello everyone, I am using a WAMP server for my coding purposes. My MySQL Version is 5.0.51b, PHP version is 5.2.6 and Apache version is 2.2.8 I have created a database with one of the tables containing a location of

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-07 Thread Sashikanth Gurram
I am just storing the location of the image(as a varchar type), not the image itself. For example for a particular image, the location is stored as C:\wamp\bin\apache\apache2.2.8\htdocs\Bldgs_lots\Burruss.jpg -sashi Nathan Nobbe wrote: On Sat, Mar 7, 2009 at 7:10 PM, Sashikanth Gurram

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-07 Thread Nathan Nobbe
On Sat, Mar 7, 2009 at 8:12 PM, Sashikanth Gurram sashi...@vt.edu wrote: I am just storing the location of the image(as a varchar type), not the image itself. For example for a particular image, the location is stored as C:\wamp\bin\apache\apache2.2.8\htdocs\Bldgs_lots\Burruss.jpg echo

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-07 Thread Sashikanth Gurram
The thing is, I do not have a website or a place where I am storing my images. I am storing the images on my local PC in folder as mentioned in my earlier post. I have tried using only the else { header('Content-Type: image/jpeg'); imagejpeg($img); imagedestroy($img); } Which you have

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-07 Thread Nathan Nobbe
On Sat, Mar 7, 2009 at 9:36 PM, Sashikanth Gurram sashi...@vt.edu wrote: The thing is, I do not have a website or a place where I am storing my images. I am storing the images on my local PC in folder as mentioned in my earlier post. I have tried using only the else { header('Content-Type: