Uploading and storing image

If you add var_dump($imageResult), what do you get as the output (may need to comment out the header() call)

this is the output i had
Notice: Undefined variable: imageResult in /Users/mgltd/Sites/reacheasy/affiliatestore.php on line 6 NULL

Using

$id =  mysql_real_escape_string($_REQUEST['id']); 
//echo $id; 
$imageQuery = mysql_query("SELECT * FROM store WHERE id=$id"); 
$imageResult = mysql_fetch_assoc($imageQuery); 
$image = $imageResult['image']; 
$nimage = $imageResult['name']; 
//echo $nimage; 
//header("content-type:image/jpeg"); 
var_dump($imageResult);
echo $image; 
?> 

Produced Undefined variable: imageResult and the value of NULL?
That means it couldn’t find the data in your table for the $id given. So it never returned an entry for the image.

but the database is showing that an image has been uploaded

What is the ID of that record?

id is 56

Okay, so try this and go to this page directly

$id =  56; //mysql_real_escape_string($_REQUEST['id']);
//echo $id;
$imageQuery = mysql_query("SELECT * FROM store WHERE id=$id");
$imageResult = mysql_fetch_assoc($imageQuery);
$image = $imageResult['image'];
$nimage = $imageResult['name'];
//echo $nimage;
//header("content-type:image/jpeg");
var_dump($imageResult);
echo $image;
?>

Then paste the output here so I can see what it returned

i tried http://localhost/~mgltd/reacheasy/getaffiliatestore.php?id=57

it says the image http://localhost/~mgltd/reacheasy/getaffiliatestore.php?id=57 cannot be dispaled because it contains error