Image Uploading

:worried: Hey guys!

I have written up a code that takes an image path from a form and checks if the width and height is 200x200 if it is then it will do the upload function (which I need help with) if it is not 200x200 then it dies out… heres my code :stuck_out_tongue:


$image = $_POST['image'];
if($image=='') {
die('Enter the path to your image');
}
$blah = getimagesize($image);
$type = $blah['mime'];
$width = $blah[0];
$height = $blah[1];
if($width == 200 && $height == 200) {
//upload function
}else{
die('Make your image 200x200');
}

With the uploading function I need it to only upload imagetypes and put it in a specific dir when it is done uploading I need it to echo the full path eg. www.example.com/uploads/kirupa.gif

:huh: