473,836 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

77 New Member
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 3618
DrBunchman
979 Recognized Expert Contributor
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("T heInputName").

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
1903
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
5425
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 occurs. After the program has read the file, it should offer a menu with three choices. the first is to list all the words along with the number of occurences. The second is to let you enter a word, with the program reporting how many times the...
20
4322
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 is structured as an upside-down tree, and (if I remember correctly) never more than 4 levels. The site basically grew (like the creeping black blob) ... all the pages were created in Notepad over the last
6
6906
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 people and user should be able choose the check boxes to whom they want to send e mail to. I write some code simple If else conditions but i think i am making some mistakes. Because when i tried - it is not sending them e mails. Here is my code. I...
3
1509
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. For some reason, unbeknownst to me (is that a word?) It doesn't work!!! Here is the code: #!/usr/local/bin/perl -w
4
3410
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. Is there any type of form/template that I could send to employees to fill out and send back for me to import into the Access Database? Or should I consider a Word Forms with some type of data extractor for loading into Access database? and if...
2
1114
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 the score. Both the name and score will be written in appropriately labeled text boxes by the user for input. The "new" command button will store the record and open the text boxes for a new one. We don't need delete, previous, or next, just search...
14
4375
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 into the URL string on a refresh of the form page. I am very green on CF and CFM files and have this code below; I need to help for the error messages to "pop up" in a new window or display on the body of the page so anyone filling out the form knows...
0
9820
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9671
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10845
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7792
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4456
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4019
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.