The whole script runs fine and uploads the images, but I cant get it to name the image file as per the input, everything I try just uploads the image as ".jpg" with no filename, but if I put in something like microtime() it names the file >.< Line 59 is the problem ---> $Unique=$POST_['housename']; // File name to match the input we posted <?php function imgReisize($uploadedfile, $Destination, $Thumb){ //this is the function that will resize and copy our images // Create an Image from it so we can do the resize $src = imagecreatefromjpeg($uploadedfile); // Capture the original size of the uploaded image list($width,$height)=getimagesize($uploadedfile); // For our purposes, I have resized the image to be // 600 pixels wide, and maintain the original aspect // ratio. This prevents the image from being "stretched" // or "squashed". If you prefer some max width other than // 600, simply change the $newwidth variable $newwidth=600; $newheight=($height/$width)*600; $tmp=imagecreatetruecolor($newwidth,$newheight); // this line actually does the image resizing, copying from the original // image into the $tmp image imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height); // now write the resized image to disk. $filename = $Destination; imagejpeg($tmp,$filename,100); // For our purposes, I have resized the image to be // 150 pixels high, and maintain the original aspect // ratio. This prevents the image from being "stretched" // or "squashed". If you prefer some max height other than // 150, simply change the $newheight variable $newheight=150; $newwidth=($width/$height)*150; $tmp=imagecreatetruecolor($newwidth,$newheight); // this line actually does the image resizing, copying from the original // image into the $tmp image imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height); // now write the resized image to disk. $filename = $Thumb; imagejpeg($tmp,$filename,100); imagedestroy($src); imagedestroy($tmp); // NOTE: PHP will clean up the temp file it created when the request // has completed. echo "Successfully Uploaded: <img src='".$filename."'>"; } if(isset($_POST[submit])){ $imgNumb=1; //This the "pointer" to images $DestinationDir="images/"; //destination dir $ThumbDir="images/thumb/"; //thumb dir here while($_FILES["img".$imgNumb][tmp_name]){ $Unique=$POST_['housename']; // File name to match the input we posted $destination=$DestinationDir.$Unique.".jpg"; $thumb=$ThumbDir.$Unique.".jpg"; imgReisize($_FILES["img".$imgNumb][tmp_name], $destination, $thumb); $imgNumb++; } } ?> <form action="images.php" method="post" enctype="multipart/form-data" > House Name: <input type="text" name="housename"/><br> <input type="file" name="img1"/><br> <input type="file" name="img2"/><br> <input type="file" name="img3"/><br> <input type="submit" name="submit" value="Submit"/> </form> Code (markup): I've tried $GET_['housename] $POST_['housename'] $POST_[housename.value] etc, but no luck, I know it's something simple but I'm stuck and can't think today