Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

posting file from server?

Status
Not open for further replies.

newbie35

Programmer
Jan 13, 2004
12
US
Is it possible to imbed a file in an HTML form (hidden field?) so that the action script accepts it as if it were a file sent from the client? I've tried using enctype=multipart/form-data and putting the file as a value of an input tag with the correct name but it wasn't accepted. Thanks.
 
I don't think so. Is there a reason you want a file embedded into the HTML in this manner? If you're just looking to include this file with the submission of the user's form data, it would be better to just read in the file after the submission and perform your functions on it there.

If you're looking to use a common script for all submissions, but the file could be different depending on the referring page, then you'd just want to have the hidden field be the location of the file you want.

Hope this helps,
- Rieekan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top