PHP, MySQL, & Images

  • Flimbles
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Sep 17, 2004
  • Posts: 5
  • Loc: Derby, UK
  • Status: Offline

Post September 17th, 2004, 4:28 am

Ok here goes, I have trawled through the web for ages trying to find an answer to this problem, and I have seen lots of notes, but I can't find a definitive answer.

I have A PHP displaying products details and a small image.

The images are stored locally to the web page

I then have the MySQL server referencing the image, But it is not pulling the image through, the code for the image is as below;

PHP Code: [ Download ] [ Select ]
<?php echo $row_Recordset1['details_image']; ?>">


or

PHP Code: [ Download ] [ Select ]
<?php echo urldecode($row_Recordset1['details_image']); ?>


but I think I may not be putting the details into the database correctly, do I put it as;

./images/image.jpg

or

localhost/website/images/image.jpg

or neither?

this has become a minor mission for me so any help would be really useful

thanx
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 17th, 2004, 4:28 am

  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 10, 2004
  • Posts: 2206
  • Loc: Canada
  • Status: Offline

Post September 17th, 2004, 11:07 am

Code: [ Download ] [ Select ]
/home/user/public_html/img/image.jpg

you have to have the first slash, not including localhost
  • Flimbles
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Sep 17, 2004
  • Posts: 5
  • Loc: Derby, UK
  • Status: Offline

Post October 5th, 2004, 12:47 pm

Thanx for that, I knew it would be a really simple thing, as they always are
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Sep 10, 2004
  • Posts: 2206
  • Loc: Canada
  • Status: Offline

Post October 5th, 2004, 1:31 pm

Heh, if it was simple it would have simply been /images/image1.jpg :D

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 89 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.