Forum Moderators: phranque

Message Too Old, No Replies

Attach Image and/or Doc To A Form

         

midnightscape

2:37 pm on Oct 9, 2003 (gmt 0)

10+ Year Member



I am wondering if there is any script (Java or such) that would users to attach a document and/or image to a form on my site? If so where does it end up going when the form is submitted, I know the form submits to me but do I have to set up a directory on our server that it will go to? I'm fairly new to web design (self-taught) and any help would be greatly appreciated.

Midnightscape

jetboy_70

2:50 pm on Oct 9, 2003 (gmt 0)

10+ Year Member



Welcome to Webmaster World midnightscape!

Is this to allow users to upload files to your site? If so there is a 'file' element to allow users to attach files to forms. I'm pretty sure that the destination is specified in the server set-up, but it is possible to specify a custom location with server-side languages like PHP, which have access to the server's file system.

midnightscape

3:06 pm on Oct 9, 2003 (gmt 0)

10+ Year Member



Ideally, I would like the attached doc or image emailed along with the form that is submitted to my email address.

And using PHP to define the destination of the file...(insert stupid question here)...is it difficult to figure out?

jetboy_70

3:20 pm on Oct 9, 2003 (gmt 0)

10+ Year Member



You'll need to have an ISP that supports PHP first of all :)

How do you turn the form into an email currently? Do you use a third-party script like FormMail.pl or similar?

Whatever you do is going to involve some work server-side, be it with PHP/ASP/whatever or an already existing script which will handle form-to-email with attachments (of which there are many). The latter is probably the easiest option. Try one of the script archives like hotscripts.com and look for form processors.

The actual file would be attached to the email like any other email attachment would, and would not need to be separately stored in a central location.

midnightscape

3:40 pm on Oct 9, 2003 (gmt 0)

10+ Year Member



Yeah, we do use FormMail.pl script for the form to email transition. That was set up before I even started messing with all this so I'm not real familiar with it.

If I use an existing script which will handle form-to-email with attachments does this still involve using PHP? Is the "work server-side" just mean finding and incorporation the PHP script?

Sorry for all the silly questions, it's all new to me, but I really appreciate your help.

jetboy_70

3:54 pm on Oct 9, 2003 (gmt 0)

10+ Year Member



No, you can forget PHP now, it was just an example.

What you are looking for is a Perl or CGI script to replace Formmail. This will do all of the server-side work for you. This shouldn't be difficult to find at somewhere like Hotscripts.

Don't worry about asking questions. Exchanging information is what we're all here for. :)