onlyican Posted September 8, 2006 Share Posted September 8, 2006 HeySomething we discussed ages ago, and never got a solution (might have been another forum)As an exampleI have a form[code]<form method='post' action='' enctype='multipart/form-data'><input type='files' name='ufile' /><br /><input type='text' name='file_name' value='".$_POST["file_name"]."' /><br /><input type='submit' value='Upload' /></form>[/code]As you can see, I am using $_POST to get the value of the form, so when validating, if they miss a field, they dont have to complete the whole form againCertain things on my form I dont want a value forPasswordsAgree to terms and conditionsBUTI would like a value for the imageDoes anyone know how to do thisLast time we suggested that I store the details I need, and have a link, saying change image click herethen parse the values over againBUT I want to know can I do something like<input type='file' name='ufile' value='".$_FILES["ufile"]["name"]."' />which dont work, but I hope u understand Quote Link to comment Share on other sites More sharing options...
Barand Posted September 8, 2006 Share Posted September 8, 2006 No . Value property of a file input field is read-only. You can only set it via Browse button Quote Link to comment Share on other sites More sharing options...
onlyican Posted September 9, 2006 Author Share Posted September 9, 2006 Is there anyway to have the "Find File" pop up keep the file name? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.