Use a default value for file in upload script

This is part of my php script.

<form action="<?=$this_script?>" method="post" enctype="multipart/form-data">
File: <input type=file name="file" size=30><br>
<input type=submit name="submit" value="Upload File"></form>
<a href="<?=$home_page?>">Return to the Home Page</a>

How can I have a default value set for the file instead of having to browse to it every time?
Grant FullenAsked:
Who is Participating?
most browser deny to set the value= for <input type="file" ...> for security reason, obviously ..
Terry WoodsIT GuruCommented:
Wouldn't it just be this?

<input type=file name="file" value="C:/directory/filename.doc" size=30>
There are no way to access the browse but you can try another way

take a look at

Grant FullenAuthor Commented:
I tried the value= thing already and I'm pretty sure it didn't work (as in the file didn't upload).

All I can find in that link is how to change the look of it.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.