Welcome Guest, Not a member yet? Register   Sign In
How To Show Already The Name Of Uploaded File Instead Of Showing "No File Selected"?
#1

(This post was last modified: 07-25-2020, 05:32 AM by jreklund.)

Hi, I have uploaded the file and now I want to show it in edit view. I know how to just echo the name below but I want to show it instead of showing: No file selected. I want to do this because each time I open the edit view, the file uploaded does not show and when I submit the form of edit view, the file is empty. This is my code in edit view:

Code:
<div class="form-group">

      <label for="example-text"><?php echo get_phrase('Browse File');?></label>

      <input type="file" name="file_name" id = "file_name" class="form-control-file" value="<?php echo $row['file_name'];?>">

</div>

Usually the value would be used in this case but that does not work. From what I have read, the value is not used in this case for security reasons. But is there any way to achieve what I am trying to do?

Any advice would be very helpful. 
Many thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB