By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,077 Members | 1,790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,077 IT Pros & Developers. It's quick & easy.

need to send email, some survey check boxes and text comments to both a file & email

P: 77
I have not made a program or page from start yet. I have made modifications to our signoff asp pages like changing the questions, texts, shortening field lengths etc... I also have copied the files and reused them for other domains

asp 1:
Basically I have a signoff asp script... that asks
a. name b. email address
(then submit)..
this data is written to a sub folder's text file with the same name signoff.txt
if the signoff.asp is bomsignoff.asp the file is created bomsignoff.txt (if it doesn't exist) or it adds it to the bottom line

asp 2:
a different asp page I have asks a question... allowing the user to check some boxes, which flags some answers... they can also add an email address and name... then comment. however all of the choices and answers are sent to an email... to a specific person

asp 3: what I want to create is a program that
part1: takes the name and email, sends them to the text file
part2: take the same name, email and check box answers, comments etc.. and email it to our individual(s)

1. I might make them all on one page
(top of the page have name/email fields... then bottom the questions and check boxes... which would be optional)

2. if the volume was to much.. I would make the survey portion option
-name, email field... then a button to take the optional survey... which grabs the name and email (doesn't need to be retyped)... onto a new asp page where questions followed by comment section boxes or survey check offs are selected... the results are then emailed


end goal:
need to send certain information to the text file... (tab deliminated)
need to send same information and more through an email..

anywhere to start for learning? or any examples? thank you. you guys are the best.

other idea:
how can I pass the name and email address field if asp page one uses a text file... and takes the input and places it there... but then pass it to asp page 2... so i can reuse that information and not make the user retype it... any idea on how to pass variables between pages?
Mar 29 '08 #1
Share this Question
Share on Google+
1 Reply


DrBunchman
Expert 100+
P: 979
Hi Jerger,

To answer a small portion of your question, to pass data between asp pages you can use a couple of different methods.

You are using a form submit on your first page so to retrieve that data on your second page you can use the following example:

Ask the user to input the data on Page 1:
Expand|Select|Wrap|Line Numbers
  1.  
  2. <form name="form1" method="post" action="Page2.asp">
  3. <input type="text" name="Username" /> 
  4. <input type="text" name="email" />
  5. <input type="submit" value="Submit" />
  6. </form>
  7.  
Retrieve the data on Page 2:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim sUsername
  3. Dim sEMail
  4.  
  5. sUsername = Request.Form("Username")
  6. sEMail = Request.Form("email")
  7. %>
  8.  
This is the post method (see the method="post" property in the form tag) and to retreive data from a post you use Request.Form("TheInputName").

There are some further examples on the w3schools site here which will explain the other methods and give you a bit more information.

As for the other parts of your question, here are some examples for sending e-mail and writing to a text file.

Give these a try, let us know how you get on and if you need any more help we'll be glad to give it.

Hope this helps,

Dr B
Mar 31 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.