I have a code which uploads an image but I cant seem to work out how to change the upload the location.

I am looking for an image to be uploaded to www.website.com/userimages/logo.php

I have tried a few options but I just cant get it upload to a designated location.

 else { 
        // Set the direntory for where to upload it, use the member id to hit their folder
        // Upload the file
		if (!is_dir('memberFiles/'.$id.'/images/')) { //if memberFiles folder does not exist
 			mkdir('memberFiles/'.$id.'/images/'); //make the folder 
		if (!is_dir('images/')) { //if memberFiles folder does not exist
 			mkdir('images/'); //make the folder 
	        $target_path = 'images/'; //set targetpath
		//adjust target path to create new file name which include $id and current date and original filename
		$ref = "-". gmdate('jmyhis') ."-". basename( $_FILES['uploadLogo']['name']);
		$target_path .= $ref;
		$filename = basename($_FILES['uploadLogo']['name']); 
		$date =	gmdate('j-m-y h:i:s');