Hi
I have a website that has a get.php file that echoes out the specific image i want
Here is the code:
$id = addslashes($_REQUEST['id']);
$image = mysql_query("SELECT * FROM items WHERE id=$id");
$image = mysql_fetch_assoc($image);
$image = $image['image'];
header("Content-type: image/jpeg");
echo $image;
To get an image from the database with the id $id, i use this code:
img src='get.php?id=$id'
The problem is that when someone wants to save the image, the URL is for example "mywebsite.com/get.php?id=137" and the webbrowser wants to save it as "get.php".
I want it to be saved as just "$id", or as in this example "137"