You are here: Re: retrieve an image in folder from info out of database « PHP Programming Language « IT news, forums, messages
Re: retrieve an image in folder from info out of database

Posted by jsd219 on 06/21/07 22:06

On Jun 21, 4:36 pm, ZeldorBlat <zeldorb...@gmail.com> wrote:
> On Jun 21, 5:18 pm, jsd219 <i...@musiclanerecording.com> wrote:
>
>
>
> > Hello, i am having problems displaying an image once i have uploaded
> > it. i upload it to a folder and store its name in a database. below is
> > the code to display the image. I have figured out the the code is not
> > grabbing the name from the database but i can not figure out why. can
> > anyone help?
>
> > //Retrieves data from MySQL
> > $data = mysql_query("SELECT IMAGE_NAME FROM item") or
> > die(mysql_error());
>
> > //Puts it into an array
> > while($info = mysql_fetch_array( $data ))
> > {
> > //Outputs the image and other data
> > Echo "<img src=http://www.abcxyz.com/pics/".$info['photo'] ."> <br>";
>
> > }
>
> > God bless
> > jason
>
> Because you're using $info['photo'] when the column is called
> IMAGE_NAME. So you probably want to use $info['IMAGE_NAME'] instead.

That worked, Thank you

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация