|
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]
|