csckid Posted July 16, 2010 Share Posted July 16, 2010 The following code doesn't work. Is there any way to set this value? <input type='file'name='image' value='c:/me.jpg'> Or can I set upload file path of client pc using php? Quote Link to comment Share on other sites More sharing options...
trq Posted July 16, 2010 Share Posted July 16, 2010 You cannot set the path to a file the a user is going to upload. It must be done by the client. Quote Link to comment Share on other sites More sharing options...
Wolphie Posted July 16, 2010 Share Posted July 16, 2010 I don't think the file upload form element allows you to set a default value. If it did, this would be a major security issue since it would allow attackers to automatically select a file in the form element and then hide the element from the user, making them unaware that a file is being uploaded when they send the form. 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.