In the following script I tried uploading file to tmp folder in htdocs but the file is not moving to that location. How do I define the storage location?
$_FILES["file"]["C:\xampp\htdocs\tmp"]
shouldn't exist, try instead:
move_uploaded_file($_FILES['file']['tmp_name'], '/path/to/your/upload/directory/' . basename($_FILES['file']['name']));
Bare in mind that this code is insecure if you use it verbatim (as it is), you need to validate the file mime type (with the proper tools) and sanitize the final file name at the very least.
well the code you posted isn't moving any file. You miss
move_uploaded_file ( $_FILES["file"]["tmp_name"][$key], 'C:\xampp\htdocs\tmp\new_file.txt' );
http://php.net/manual/en/function.move-uploaded-file.php