0

I have a problem with the input type file code in html that by default it will need the user to browse and re upload back the file if have an error when submitting a form. Can anyone guide me to code or give an example of code based on my question below :

1) the user have upload the file but when form submitting have error , it will not show back the previous uploaded file..it show "No File Choosen"..can I have an example of code that the user didn't have to re upload back the file if there is any error on form submitting? I want the previous upload file stay showed besides the Choose File button till the form have been completely success submitted.

Best Regards.

1 Answers1

0
<input type="file" name="file_upload" 
value="<?php if(isset($_POST['file_upload'])){echo  $_POST['file_upload'];}?>"/>

EDIE

Duplicate question SO Duplicate question

Community
  • 1
  • 1
Billy
  • 2,448
  • 1
  • 10
  • 13