Basically working on a test to get an idea about how to upload/display images in relation betweehn php/mysql.
The problem is after I upload the image, on database, BLOB column just dipslays the "im" instead of "image/jpeg". What could be the problem that is inserting the data as an "im"?
Many Thanks
Here is the Code
$aname = $_POST['aname'];
$adetails = $_POST['adetails'];
$aphoto = addslashes(file_get_contents($_FILES['aphoto']['tmp_name']));
$image = getimagesize($_FILES['aphoto']['tmp_name']); //to know about image type etc.
$aphototype = $image['mime'];
$q = "INSERT INTO animaldata VALUES('','$aname','$adetails','$aphoto','$aphototype')";