1

I am writing the code for editing a form that contains an input file field. I am getting all the values pulled from database for different field types but the file type input does not show its value.

I have a code that looks like this:

<input name="edit_cmpny_logo_name" id="edit_cmpny_logo_id" type="file" class="inputfield span2" onchange="clearmessage()" onselect="clearmessage()" value="<?=$edit_row_details_arr[0]['LOGO_FILE'];?>" title="<?php echo lang('Size of Logo should be 4KB to 10KB.');?> <?php echo lang('Upload only .bmp, .gif, .jpg, .jpeg, .png Files');?>"/> 

How do I load the value of input type when someone is editing the form and can see the old image/file and edit/replacing with the new image/file .

Chethan N
  • 1,110
  • 1
  • 9
  • 23
user3301123
  • 25
  • 2
  • 8
  • 2
    You can't initialize a `file` input. The database only has the filename, not the whole path to the file on the client. – Barmar Feb 22 '14 at 08:58
  • possible duplicate of [Dynamically set value of a file input](http://stackoverflow.com/questions/1017224/dynamically-set-value-of-a-file-input) – Djizeus Feb 22 '14 at 09:10

0 Answers0