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

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

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

 

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

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