HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
input type file help
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
quartzy



Joined: 26 Dec 2007
Posts: 405

PostPosted: Thu Apr 10, 2008 3:30 am     input type file help Reply with quote

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
Site Admin


Joined: 15 May 2004
Posts: 8301
Location: Castle Pines North, CO USA

PostPosted: Thu Apr 10, 2008 11:23 am     Reply with quote



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: 405

PostPosted: Thu Apr 10, 2008 11:37 am     re Reply with quote

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
Site Admin


Joined: 15 May 2004
Posts: 8301
Location: Castle Pines North, CO USA

PostPosted: Thu Apr 10, 2008 11:52 am     Reply with quote

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 Smile )

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: 405

PostPosted: Thu Apr 10, 2008 12:13 pm     re Reply with quote

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: 405

PostPosted: Thu Apr 10, 2008 1:28 pm     re Reply with quote

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
Site Admin


Joined: 15 May 2004
Posts: 8301
Location: Castle Pines North, CO USA

PostPosted: Thu Apr 10, 2008 2:55 pm     Reply with quote

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: 405

PostPosted: Fri Apr 11, 2008 2:03 am     re Reply with quote

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
Site Admin


Joined: 15 May 2004
Posts: 8301
Location: Castle Pines North, CO USA

PostPosted: Fri Apr 11, 2008 7:08 am     Reply with quote

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: 405

PostPosted: Fri Apr 11, 2008 7:41 am     re Reply with quote

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
Site Admin


Joined: 15 May 2004
Posts: 8301
Location: Castle Pines North, CO USA

PostPosted: Fri Apr 11, 2008 11:52 am     Reply with quote

Expression Web will probably use .NET - which chances are pretty high it will not work on *NIX machines.

You will probably have to code it yourself in PHP. Expression Web 2.0 (Beta) is also out which actually has some PHP support.

_________________
Corey
Payment Processing Forums | Mile High Merchant Accounts | Microsoft Expression Web Blog
quartzy



Joined: 26 Dec 2007
Posts: 405

PostPosted: Fri Apr 11, 2008 11:58 am     re Reply with quote

ok thanks I will get a look at expression web 2.0 at the moment I am getting an error, with expression web.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial