Trying to get an image out the db and into a file...is not saving/writing to the file...file is being created but not passed to the file...getting a Undefined variable: img in the page where $img is the db query result...
Bastien
Cat, the other other white meat
Code:
$results = mysql_query($sql) or die ("Can't connect to DB because ".mysql_error());
//check for results
if (($results)&&(mysql_num_rows($results)==1)){
//we have the image
while ($row=mysql_fetch_array($results)){
$img = $row['evidence'];
}//end while
}//end if
//save the photo temporarily to the disk - delete when finished
$temp_image = fopen($my_image,"w+b");
fwrite ($temp_image, $img);
fclose($temp_image);
Bastien
Cat, the other other white meat