Hello, I am having some issues with changing the URL of an image. What I want to do is load images through a PHP file.
for example, I have images in a folder, these images are also in my database(just the file names). I want to have the page with the image to use something like
//Im actually pulling the $id from database with:
<img src="get_file.php?file=<?php echo $seepic['hash'];?>"/>
where get_file.php has code like:
$hash = $_GET['file'];
//select data from database
$pullinfo = mysql_query("SELECT `filename`,`hash`,`filetype`,`thumb`,`views` FROM `userfiles` WHERE hash = '$hash'") or die("SQL error: ".mysql_error());
$seepic = mysql_fetch_array($pullinfo);
$pic = 'image_folder/'.$seepic['filename'];
// load the file to send:
I have tried many variations of this code, using all sorts of methods found on this forum and others, but the result is always the same! The image does not display on the page.
If anyone can help me it would be great!