While I was implementing a file upload progress bar in PHP, I saw this target attribute in form
tag. The code was like this:
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>"
method="POST" id="myForm"
enctype="multipart/form-data"
target="hidden_iframe">
What is the use of this target attribute
here?
Actually, after submitting this form data (file) we track the upload progress from another page say upload.php
. Could we implement this without the target attribute?
That is used to specify in which window you would like to show the response from the remote server upon submitting your form.
Possible values are :