Hello Everyone!
I've got a simple problem with regards of input type = "file".
What I want to do is to keep the value of the input type = "file"
but unlucky when the user clicked submit button the value of input type = "file" gone.
This code wont work on me...
<input type = "file" name = "txtfileName" value = "<?=$_Post['txtfileName']?>" />
Please Help thanks... and God Bless
INPUT TYPE ="FILE" PROBLEM...
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: INPUT TYPE ="FILE" PROBLEM...
I cannot set that value for security reasons. If you could then you could build a page that specifies a file, auto submit the form and upload it. But, perhaps that is what you want to do. 
(#10850)
Re: INPUT TYPE ="FILE" PROBLEM...
Thanks for the interest of helping me...arborint wrote:I cannot set that value for security reasons. If you could then you could build a page that specifies a file, auto submit the form and upload it. But, perhaps that is what you want to do.
Anyway here is the scenario,
The user view my page then fill up the information ask..
Example
name : ("textbox")
address: ("textbox")
browse file : ("File")
then click submit
after clicking the submit button my program will verify the information. if information are incomplete it will prompt ("Please Complete the Information Needed!") and
back to the main page.
To make it more user friendly, all the fields that already fill up by the user are still there...
using <input type = "text" name = "txtName" value="<?=$_POST['txtName']?>" />
but this code is not working with <input type = "file" name = "txtFile" value="<?=$_POST['txtFile']?>" />
any suggestion?
Thanks
Re: INPUT TYPE ="FILE" PROBLEM...
There is no solution. This action is disabled for security reasons. They will have to reupload the file.
Re: INPUT TYPE ="FILE" PROBLEM...
ahh.... thanks for the informationdayyanb wrote:There is no solution. This action is disabled for security reasons. They will have to reupload the file.