Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using ASP for forms 1

Status
Not open for further replies.

natwod

Programmer
Nov 21, 2002
41
US
I trying to make a form in which the user would enter info (name, address, etc.) and this info would be sent to the company I am making the site for. I don't have much experience with *real* forms like this.

I have a book on ASP which has a section on retrieving info from a user, but all it really tells how to is display the info on the user's screen, not send it somewhere.

There is also a section in the book on making, editing, and reading text files. I was thinking of having the form write the info to a text file on the server and setting it up so that the company could easily access the info. Would this work? Is there an easier way to actually store user-entered data and make it available to the company?
Any Suggestions are greatly appreciated!
Thanks!
Nate
 
you have some options but can be restricted to what components are installed on the server
first and longest
insert all the data into a DB for the company to view
(doesn't sound like it would meet this well) but

use CDONTS to mail it to the company

SMTP to send the mail

you will mopre then likely have components installed on the server for both but certainly one or the other ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

 
To call what ever you decide you can use or want to use you just add the processing page (CDONTS, SMTP or DB insert) into the FORM tag with the action attribute as
<form name=&quot;frm&quot; action=&quot;cdontsMail.asp&quot; method=&quot;post&quot;>

---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

 
Thanks for the great information!! I probably won't use my original idea now... but I'm still curious as to whether or not the text file idea would work.
Nate
 
the text file idea will work but it really seems out of the ordinary for something like this. If you were going to do some kind of data collection as that then you would be better off with a database ---------------------------------------
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top