form to email document

G

Glenn

Hi,

Is there a way to have a user fill out a form, browse their computer to find
a document and have it emailed along with the form to a designated user?

I've seen the white page on how to upload a file to a website using a form
and to receive an email at the same time, but I haven't seen how to do this.

Could someone please let me know if it's possible, and if so point me to
some directions?

Thanks!
 
K

Kevin Spencer

Hi Glenn,

How are your programming skills? You could do this by writing a custom ASP
(or PHP, CGI, or whatever is available on your hosted server) form handler.
It requires some server-side programming skill to do so.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
G

Glenn

I've never worked with PHP or CGI. I've donea little ASP, but am still
very much a rookie.

I was hoping for something like the procedure used to upload a form, send an
email, write to a database.......there's a KB article on that, and I can do
that type of thing no problem. I could just do it that way, but I would
prefer not to because I believe that if by chance two different users have a
file with the exact same name, the first one would get erased when the
second one is uploaded and I'd miss it.
 
K

Kevin Spencer

Hi Glenn,

You can avoid duplicates by different users by assigning a file name to the
file uploaded. There are several ways to make this file name unique,
depending upon how you want the program to behave. Here are some
suggestions:

1. If the users are logging in, you can grab the user's login ID, and create
a folder for each user, under a parent folder for all user images. Save each
user's images to their own folders.
2. If not logging in:
a. If you want each user to be able to overwrite their images, you can
append the Session ID for that user Session to the file name. This way, no
other user Session (including future Sessions started by the same user) can
overwrite the file. But during each user's Session, they can re-upload and
overwrite their own files.
b. If you are not worried about duplicated images (via re-upload) from
the same user, you can simply append an incrementing number to each file
name uploaded.This can come from a simple text file or a database.
Alternatively, if you want to store the image information in a database,
when the image is uploaded, store the actual image file name in the
database, in a table that has an AutoNumber field in it. Then re-name the
image file by appending the record's ID to the file name. The image can then
be fetched from the file system using the database, by querying the database
for the record ID and file name, appending them, and retrieving the file.
This way you can (if your program needs to) display the original file name
to the user in a browser.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
K

Kevin Spencer

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/activeservpages.asp
http://msdn.microsoft.com/library/en-us/script56/html/vtoriVBScript.asp?frame=true

That is why I asked you how your programming skills are! As I mentioned, you
would need to write a CUSTOM server-side web application to do this, which
means, you're not going to find a KB article or online tutorial that tells
you each step in detail. You may be able to search MSDN online to find
articles about each of the pieces (I believe you can), but you're going to
have to put them all together in your own home-rolled ASP app.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 

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

Top