473,387 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
1 3587
DrBunchman
979 Expert 512MB
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

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

Similar topics

9
by: Jofio | last post by:
I am just learning PHP. I just tried coding a php script which I saved as mail.php ---------------------------- <? $name=$_POST; $email=$_POST; $comments=$_POST;
66
by: genestarwing | last post by:
QUESTION: Write a program that opens and read a text file and records how many times each word occurs in the file. Use a binary search tree modified to store both a word and the number of times it...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
6
by: Harshpandya | last post by:
Hi all, I am working on the form in which you fill out the whole PHP form and e mail that details to someone. It is working fine. But now i want to send the same form to be sent to different...
3
Kelicula
by: Kelicula | last post by:
Hello all! I am getting very close to comleting my recent project thanks to everyones help. I am at a stage where I will start to emplimement end result code. (almost) But I have a problem....
4
by: shelley_2000 | last post by:
What is the best approach to collect and load Employee Resume Data from External Employees who may not have Microsoft access? If is likely they will have Microsoft Word, but not Microsoft Access. ...
2
by: corinne08 | last post by:
the problem is.... Make a program with two functions. One is to take in records composed of a name and numerical score and store these in a file. The records can be looked up by name to recover...
14
by: confusedfusion | last post by:
Not sure how many form submissions that have been lost over the years before I started but the company has a contact form that the required fields when validation fails the error message is going...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.