<script type="file" name="photo"> ?

  etherington 13:04 31 Jan 08

I'm trying to add an "upload your photo here" to the form here:

click here

which seems to work from the user end - it allows you to navigate to the file and select it.

Then when you submit it, the form arrives with no file but a (useless) link the to the user's local file on their desktop (C:\desktop\filename sort of thing) all in text

I've scoured the help sites but can't see what I'm missing - any ideas?

  ElanMan 16:48 31 Jan 08

Inside your form tag you need to have enctype="multipart/form-data" to enable it to handle file uploads.
e.g.form method="post" enctype="multipart/form-data" action="../cgi-bin/novice.cgi" onsubmit="return validate();"

  etherington 17:45 31 Jan 08

Oh this is interesting - I added the enctype bit and it now seems to ignore the success page tag and take you to one within the novice.cgi file and the image is embedded hex in the resulting email, and not detachable.

I feel like we're getting warmer but I'm out of my comfort zone a bit here. Thanks for other suggestions.

  etherington 17:49 31 Jan 08

actually it's not picked up any of the other input fields either so I'm not sure what i've done wrong.

  Forum Editor 18:57 31 Jan 08

and popular way to handle uploads:

click here

  etherington 07:49 01 Feb 08

Looks good but a cost of $50 - I'd love get the code working before I resort to paying ;)

This thread is now locked and can not be replied to.

Surface Pro 5 News - release date, UK price, features, specs

Animator Emanuele Kabu’s psychedelic video is a stunning tribute to Lisbon city

Best Mac antivirus 2017