Re: How to call image from mySql to php file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, February 21, 2007 8:26 am, Chris Carter wrote:
>
> I have a field in database called "logos" which has one value
> "images/logos/some_logo.jpg"
>
> In my php I am trying to call it in my php file as image. With this
> code.
>
>  $sno = $_REQUEST['sno'];
>
> $query="SELECT logos FROM table WHERE sno = '$sno'";
>
> $result=mysql_query($query);
> $num=mysql_numrows($result);
>
> mysql_close();
> $logos=mysql_result($result,$i,"logos");
>
> echo "
> <div>
> <p> $logos </p>
> </div>";
>
> ?></div>
>
> But getting errors. What is the way to call image in php file from the
> database. I know that this is a very basic question but first time for
> me. I
> ignored this in the begining but now its right infront of me.

Your goal is to get valid HTML to be output, that does what you want.

Use "View Source" in your browser to see what you have.

Does this look like valid HTML:
<p> images/logos/some_logo.jpg </p>
that does what you want?

How could you change your source to make it look like valid HTML that
does what you want?

Hint:  You need an IMG tag somewhere.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux