Solved

Script for auto-responder

Posted on 2003-11-29
6
184 Views
Last Modified: 2013-12-25
My HTML "Subscription" form has a number of text fields, 2 list boxes (State & Country) and one radio button group. All fields, with the exception of 2 are 'required'.

I have written my CGI using Perl. The first part of the form rewrites to form if there are any 'required' fields that were not filled in. In rewriting the form, I have written script to retain any previously entered data in the forms fields. I have been successful at doing this for all fields but one; the radio button group.

QUESTION #1
The HTML is calling for no 'default' radio button. The subscriber is to select one and I want the script to rewrite the group, retaining the selected (checked) radio button.

___________________________

The rewritten page is designed to allow the subscriber to complete the required fields and the to resubmit the form.
A. A response screen is now written and displayed in the browser.
B. An auto-responder forwards a thank-you to the subscriber and
C. The form data is forwarded to my email address.

QUESTION #2
Problem: the autoresponderAND response to my email address is forwarded when submitted to the HTML form.  Therefore, if all fields are not conpleted, the auto-responder is still activated as is the response to my email address, providing me with only partial info.

There is probably an 'else' statement missing somewhere, but I can't seem to get it right.

HELP, before I finish pulling out my 56 year old hair.

THX!!
Jack

PS: If need be, I can forward the applicable script. There is really way too much to post here.
0
Comment
Question by:Happyjack
  • 3
6 Comments
 

Author Comment

by:Happyjack
Comment Utility
Just a comment,
I have resolved the first question by looking at an earlier posted question by me some months ago. Guess I didn't learn my lesson :(

Anyway, the second issue is still up for grabs and I will keep it to 500 points even though I don't need the first question answered.

Here is the address for the subscription form:
http://www.phlebotomy-tutorial.html

I will post the cgi code in a few minutes
0
 

Author Comment

by:Happyjack
Comment Utility
Okay, here is the link to the script:

http://www.phlebotomy-tutorial.com/subscribe.cgi.txt

Since there is no need to answer the first??, can someone pick up on what is most likely a very simple one.

Looking at the last 3-4 lines of code on my script, I am trying to provide a MAIL link to my web site. What is the format?

THANKS!!
Jack
0
 

Author Comment

by:Happyjack
Comment Utility
SORRY!! :O
I noticed that the form address above is incorrect.
Try this:

http://www.phlebotomy-tutorial.com/subscribe-frm.html
0
 
LVL 1

Accepted Solution

by:
david_ross earned 500 total points
Comment Utility
Just change "##else" on line 1406 to "else" and you should be ok.

I would also suggest using for loops and arrays for your country and states.  It makes your script much easier to manage.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now