<input type="file" name="test_image" value="">

$_FILES[' ']['name']
..............................................
uploadimage($img,$path)
{
define("MAX_SIZE","1024");
getextension($img)
{
$i=strpos($img," ")
if(!$i)
{
return " ";
}
$l=strlen($img)-$i
$ext=substr($img,$i+1,$l);
return $text;
}
$image=$img;
$errors=0;
if($image)
}
$filename=stripslashes($_FILES[$img][image name])
$extension=getextension($filename);
$extension=strto lower($extension);
if(($extension !="JPG")||($extension !="PNG")||($extension !="GIF")||($extension
!="QMP"))
{
echo "UNKNOWN extension"
$errors=1;
}
$image_name=time() '.'$extension;
$new_name=$path$image_name;
$copied=copy($_FILES[$img],['$tmp_name'],$new_name);
if(!$copied)
{
echo"copy unseccfull"
$errors=1;
}}}
if(!$errors)
{
echo"file upload sussfull"
$img_set==$img_name;
return $img_set;
}

Sign up to vote on this title
UsefulNot useful