Page 1 of 1

file browse for upload

Posted: Tue Nov 22, 2005 12:51 am
by xeno439
looking for browse for file upload code to enable a user to submit an attachment to an email script for my website.
free flash email forms

this code needs to redirect to a java window that lets users select a file from their machine to upload, then send that file through along with the message. thanks for any help or ideas for a newbie.[/url]

Posted: Tue Nov 22, 2005 1:59 pm
by trukfixer

Code: Select all

echo '<FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST"><input type="file" name="myfile"><input type="submit" name="submit" value="upload"></form>';
Jcart | fixed parse error ;)

Posted: Tue Nov 22, 2005 2:26 pm
by Burrito
as for passing the file around with JS, you will more than likely run into some issues with that plan.

Browsers don't interact well with your local filesystem by design. This is security precaution so that malicous coders can't attack your local machine when you visit their site.

I would guess that passing the file value from pop-up window (or the like) back to the parent window, will NOT work....but I *might* be wrong 8O