Creating a Form with Image Attachment Option

Asked by:
ClimbingRocks / 34 Points
Time:
2011-09-10 2:41 am EST
Category:
How To
Hits:
1,427
Hi! I'm very new to coding and such and I'm wondering if anyone can help me with the coding I would need so that people filling out my form would also be able to attach a couple images to their entry. My form is coded in HTML and uses Perl and CGI scripts on the server, I think... I would also like to note that the entries are being delivered into my Inbox and I would like the images to accompany the entry form. Also, would I have to upload any addition Perl or CGI scripts to the server? Any information you all can provide me with would be GREATLY appreciated! Thanks!

To ask this user for more information, please first login.

To submit an answer, please login.

Best answer chosen by Web Hosting Hub staff

0

bradm
Staff
1,846 Points
2011-09-11 1:29 am EST
Hi ClimbingRocks,

If you're new to coding, you have definitely chosen a more advanced topic to begin with!

I have used PHP before to upload images to a server, but I don't have experience with using Perl to upload images.

In a nutshell, what you'll need to do is:

1. create a contact form that allows users to upload image.
2. After the form has been submitted, email the content to yourself
3. Delete the uploaded content from the server

There's a lot to look out for too. For example, can the user upload any file or does it have to be a .jpg / gif? Is there a file size limit, or can users upload a photo 10MB large?

I don't have any code to provide at this time, but I recommend that you look at this task as separate mini tasks, as outlined 1 - 3 above. Google is going to be your friend for finding the scripts you'll need. Focus on the first step of allowing the user to upload a file. Once you've done that, then work on sending an email with an attachment. Once you've done that, delete the image from the server.

I hope this helps at least point you in the right direction. Let me know if you have any further follow up questions.

Thanks!
- Brad

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}