Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Script for auto-responder

Posted on 2003-11-29
6
Medium Priority
?
195 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
4 Comments
 

Author Comment

by:Happyjack
ID: 9843941
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
ID: 9844152
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
ID: 9845943
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 2000 total points
ID: 10136308
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

824 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