Form which e-mails

Y

YoMamaJoe

I know how to make a mailto: link which has the subject, etc. But, how
do I make a form which lets the user upload a file which would be an
attatchment? I am planning on making an image upload website. So, I
would want to limit the filetype to .jpg, .bmp, and .gif files which
are less than 200kilobytes. Then, I when I recieve the message, I would
put it up on my webpage, and email the link to the user.
 
W

web.dev

YoMamaJoe said:
I know how to make a mailto: link which has the subject, etc. But, how
do I make a form which lets the user upload a file which would be an
attatchment? I am planning on making an image upload website. So, I
would want to limit the filetype to .jpg, .bmp, and .gif files which
are less than 200kilobytes. Then, I when I recieve the message, I would
put it up on my webpage, and email the link to the user.

The input element defines a form control for the user to enter input.
The file input type creates a field through which users can upload
files from their local computer or network.

For example:

<form action = "path/action" method = "post">
<input type = "file">
<input type = "submit" value = "Upload Image">
</form>

Look more into it. As for limiting the file type and the file size,
this is best done on the server side.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top