Hide/encrypt value from database

hey guys… Im trying to get a image link from my db and set it inside a div.

function pic() {
// after connecting + db selection.
$p = "SELECT pic FROM table WHERE userid='1' ";
$q = mysql_query($p) or die(mysql_error());
$fetch = mysql_fetch_array($q);
$x = $fetch['pic'];
echo $x;
<div class=pic><img src="<?php pic();?></div>

the value goes like /images/pic/picname.jpg

I can actually see the pic there.
but what i really want is when i right click on it shows that the image address is the same in database..Now is there anyway to encrypt / hide that link?

Thanks in advanced!


$id = isset($_GET['id']) ? (int)$_GET['id'] : 0 ;

if(0 === $id){

#connect to db n stuff
$res = mysql_query('SELECT path FROM table WHERE id = ' . $id . ' LIMIT 1;');

if(0 === mysql_num_rows($res)){

$image = mysql_fetch_assoc($res);

header('Conent-Type: image/jpeg');

<img src="image.php?id=6" alt="#" />

Thanks a Million Pal!