| View previous topic :: View next topic |
| Author |
Message |
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Thu Apr 10, 2008 3:30 am input type file help |
|
|
|
I want to make a small form where the word.doc is enclosed and returned to me. I have an example from a book
| Code: |
| <form action="client/php" method="post" encype="multipart/form-data"><input type="file"> |
but I cannot figure out how the form comes to me, and where I put my email details, also the client/php is that a file? And would I need to add the file I want back. It is all confusing. HAve looked on the web ut cannot find the way to format the form yet. Maybe someone here will know. |
|
Corey Bryant

Joined: 15 May 2004 Posts: 8154 Location: Castle Rock CO USA
|
Posted: Thu Apr 10, 2008 11:23 am |
|
|
|
|
What do you have in the client/php file? This is where you are posting your data to and processing the form.
For example here is an example on Processing the Form with the JMail EMail Component.
| Code: |
Namename = "Name: "
Name = Request.Form("Name")
EMailname = "E-Mail Address: "
EMail = Request.Form("EMail")
Dim Messagename,Message
Messagename = "Message: "
Message = Request.Form("Message")
IPname = "IP Address: "
IP = Request.Form("IP")
User_Agentname = "Browser Info: "
User_Agent = Request.Form("User_Agent")
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "smtp.example.com:25"
JMail.AddRecipient "crbatexample.com"
JMail.Sender = Request.Form("EMail")
JMail.SenderName = Request.Form("Name")
JMail.Subject = "Your Subject"
Dim strbody
strbody=strbody & Namename & Name & vbcrlf
strbody=strbody & EMailname & EMail & vbcrlf
strbody=strbody & Messagename & Message & vbcrlf
strbody=strbody & vbcrlf
strbody=strbody & IPname & IP & vbcrlf
strbody=strbody & User_Agentname & User_Agent & vbcrlf
JMail.Body = strbody
JMail.Execute
%> |
This is where the form is posted to and the form is processed with the JMail ASP EMail component.
_________________
Corey
Hosting Solutions | Mile High Merchant Accounts | Expression Web Blog |
|
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Thu Apr 10, 2008 11:37 am re |
|
|
|
So from your example I would need a asp database????
IS there a way to just get a form sent to me through my email? Or does this jmail do that? |
|
Corey Bryant

Joined: 15 May 2004 Posts: 8154 Location: Castle Rock CO USA
|
Posted: Thu Apr 10, 2008 11:52 am |
|
|
|
For the form above, you need to have the JMail ASP Component installed (usually on the Windows server). This will only send an email to the specified individual.
Chances are though, you probably need to use PHP (I was only giving you this as an example to let you see what you are in for )
mjpliv posted a link on Send mail directly through web-site that might be better.
I also found PHP Form WizardPHP Form Wizard[/url] that might be another option as well (they seem to have a free download which might be enough to get you started). And then I saw Form to Email that seems to be in PHP.
You will probably find more things in PHP (free) and on Windows, you will usually need to pay (more) for some things. For example, the JMail component above - it might not even be available any longer for sale - since Windows is pushing more for .NET applications and pushing ASP under the rug.
_________________
Corey
Toll Free Solutions | Mile High Merchant Accounts | Expression Web Blog |
|
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Thu Apr 10, 2008 12:13 pm re |
|
|
|
| yes, these are good for email forms, but I dont want to do that, I need the person to browse on their computer and pick a file to send to me through the email. Like if they were adding a photo to a site. IS this contaminated with spam too? My server has frontpage extensions but it is a linux server so does not use windows but it uses php and red hat, and probaly sql. |
|
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Thu Apr 10, 2008 1:28 pm re |
|
|
|
In your tutorials on file input it says I need a CGI bin I have one of those on my hosting, so how does the form get to me? do I need to download it from the server. Or will it come to me in an email.
Sorry if my previous reply was mixed up, I feel that way with all these things I have to learn. |
|
Corey Bryant

Joined: 15 May 2004 Posts: 8154 Location: Castle Rock CO USA
|
Posted: Thu Apr 10, 2008 2:55 pm |
|
|
|
Hm, I am confused. You don't want people to send an email, but you do want people to send you an email with an attachment?
You will need to know some type of server side scripting to do this - FrontPage 2002 / 2003 offers a file upload feature, but this pretty much only works well on a Windows server.
Are you processing forms now online? If so, how are you doing that?
_________________
Corey
Toll Free Numbers | Merchant Accounts |
|
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Fri Apr 11, 2008 2:03 am re |
|
|
|
Hello
Yes I am adding a Word.doc which is a set form, and they need to digitally sign it and return the form to me, to make it easier I want them to upload the form from their computer as an attachment or not. I have frontpage so I will look at that again and see if that will do it, I k=have frontpage extensions on my server. Otherwise I will need a php script I think, that seems to be the only option. |
|
Corey Bryant

Joined: 15 May 2004 Posts: 8154 Location: Castle Rock CO USA
|
Posted: Fri Apr 11, 2008 7:08 am |
|
|
|
If you are on a *NIX server, the upload feature won't really work well.
If they are digitally signing something - why the need for the document? Usually when users sign (digitally / electronically), they just click to an "I Agree" and maybe type in their name.
_________________
Corey
Toll Free Phone Numbers | Processing Credit Cards | Microsoft Expression Web Blog |
|
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Fri Apr 11, 2008 7:41 am re |
|
|
|
| expression web has an input file form, in the toolbox area, so I am working on that. Dont understand the NIx ways, just contacted my server and it looks like I can get it to work. |
|
Corey Bryant

Joined: 15 May 2004 Posts: 8154 Location: Castle Rock CO USA
|
|
quartzy
Joined: 26 Dec 2007 Posts: 400
|
Posted: Fri Apr 11, 2008 11:58 am re |
|
|
|
| ok thanks I will get a look at expression web 2.0 at the moment I am getting an error, with expression web. |
|
|