I have a PHP file with code as below with the functionality to save an image in a file directory , after uploading from mobile.
<?PHP
$data = file_get_contents('php://input');
echo $data;
exit ($data);
if (!(file_put_contents($_GET['filename'],$data) === FALSE)) echo "File xfer completed."; // file could be empty, though
else echo "File xfer failed.";
?>
We dont have much control on the front end side to change , so the logic of storing an image in MY SQL db should be from PHP script.
the $data echo results as below for an image of JPG format http://goo.gl/4AsU52
$data Echo :
Now , how do i store the $data value/its relative file directory in php into MYSQL DB?