php - Is it possible to get $_FILES["inputID"]["tmp_name"] from a file field using javascript? -


i have input field:

<input type="file" id="inputid" name="file"> 

when button clicked submit, javascript function run (url: upload.php). need able access $_files["inputid"]["tmp_name"] input field use on upload.php as,

move_uploaded_file($_files["inputid"]["tmp_name"], $target_file) 

is possible?
@ moment, error:

notice: undefined index: inputid

any appreciated.

thanks much! :-)

move_uploaded_file() php function, running on php-based server-side application.

it handled php when form has been submitted.

you cannot access javascript before has been sent, whatever way submit it, both asynchronously xhr request, or directly submitting form handler route.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -