my php script looks like this:
<?php
$con=mysqli_connect('mysql.hostinger.in','username','password','databasename');
$data = $_POST['img'];
$name=$_POST['name'];
$data = base64_decode($data);
$file = 'images/'. md5($name) . '.png';
if (file_exists($file)) {
unlink($file);
}
$success = file_put_contents($file,$data);
echo "success";
?>
There are 2 problems:
Size of a request header field exceeds server limit
."please help me out what should i do? and for testing purpose i have converted Image to base64
string via online site.