Page 1 of 1
INPUT TYPE ="FILE" PROBLEM...
Posted: Tue Jan 29, 2008 8:14 pm
by mhonnphp
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
Re: INPUT TYPE ="FILE" PROBLEM...
Posted: Tue Jan 29, 2008 9:42 pm
by Christopher
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.

Re: INPUT TYPE ="FILE" PROBLEM...
Posted: Tue Jan 29, 2008 10:00 pm
by mhonnphp
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.

Thanks for the interest of helping me...
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...
Posted: Tue Jan 29, 2008 11:51 pm
by dayyanb
There is no solution. This action is disabled for security reasons. They will have to reupload the file.
Re: INPUT TYPE ="FILE" PROBLEM...
Posted: Wed Jan 30, 2008 6:06 pm
by mhonnphp
dayyanb wrote:There is no solution. This action is disabled for security reasons. They will have to reupload the file.
ahh.... thanks for the information