I was wondering if there are other ways than the way I want to retrieve a image from my database. When I use this code I get a broken image icon and that's it! The way it works is that I store the location path of an image in the database like such:
$target=$_SERVER['DOCUMENT_ROOT'] . "/images/" . basename( $_FILES['file']['name']);
and then retrieve it by php lke such:
echo '<img src="'. $_SESSION['pic_location'] .'"/>';
Now in my database it gives the location path like such for e.g.
C:/xampp/htdocs/images/beetgejo.jpg
I don't think it will work when the ENTIRE path is stored?? Can it be stored like such:
../images/beetgejo.jpg