I have already upload my system into my online web hosting..When im try to upload my image into my system using my smart phone, i got an error...but when im try to upload my image using my computer, its everything ok...im try to upload the "JPEG" image format.
This error is :-
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in XXXX/XXXX/XXX/xxxx.php on line 20 is not and acceptable format..
Here my code...
- Code: Select all
<?php
include ('config.php');
$name = $_FILES['picture']['name'];
$tmp_name = $_FILES['picture']['tmp_name'];
$type = $_FILES['picture']['type'];
$size = $_FILES['picture']['size'];
list($width, $height, $typeb, $attr) = getimagesize($tmp_name);
if($width>600 || $height>500)
{
echo $name . "'s dimensions exceed the 600 x 500 pixel limit.";
die();
}
if(!($type=='image/jpeg'||$type=='ima…
{
echo $type . "is not and acceptable format.";
die();
}
if($size>'350000')
{
echo $name . "over 350KB";
die();
}
if(!get_magic_quotes_gpc())
{
$nname = addslashes($name);
}
$extract = fopen($tmp_name,'r');
$content = fread($extract,$size);
$content = addslashes($content);
fclose($extract);
$query = "INSERT INTO xxxx values ('','$xxx','$xxxx','$xxxxx','$xxxxx','$x…
$result = mysql_query($query) or die(mysql_error());
$xxxxxx = "SELECT xxxxx FROM xxxxxxx ORDER BY xxxxxx DESC LIMIT 1";
$xxxxxx = mysql_query($xxxxxx);
$rows_r_s_b = mysql_fetch_array($rxxxxxxxx);
$data = $rows_r_s_b['xxxxxxx'];
if($result)
{
header("Location: xxxxx.php?xxxxxx=" . $data); ?>
<!--<script type="text/javascript">
alert("xxxxxxxxxxxxxxx");
window.location = "xxxxxxxxxxxxxxxxxxxxx.php";
</script> -->
<?php
}
mysql_close();
?>
Please guide me to resolve my problem...


