# Image Uploading

**URL:** <https://forum.kirupa.com/t/image-uploading/197800>\
**Category:** Uncategorized\
**Created:** [August 19, 2006, 7:17am UTC](https://forum.kirupa.com/t/image-uploading/197800 "2006-08-19T07:17:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GPP](https://avatars.discourse-cdn.com/v4/letter/g/848f3c/32.png) [@GPP](https://forum.kirupa.com/u/GPP)\
**Post date:** [August 19, 2006, 7:17am UTC](https://forum.kirupa.com/t/image-uploading/197800/1 "2006-08-19T07:17:33Z")

</div>

😟 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 😛

```php

$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](http://www.example.com/uploads/kirupa.gif)

:huh:
