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
Post a Comment