in reply to form recipients

Ok, cool. What's your question? If you're getting an error, what's the error? To change who the email gets sent to, set up some logic before the  open(MAIL ... line where
# psuedo code here if ( $FORM{'thisbox'} ) { $recipient = 'fozzybear@muppets.edu'; else if ( $FORM{'differentbox'} ) { $recipient = $recipient.',bigbird@sesame.edu'; }
but now I'm trying to guess what your problem is and that's not much fun. . .

- - arden.

update: I forgot to ask, which version of Perl do you have on your system?

Replies are listed 'Best First'.
Re: Re: form recipients
by togrady (Initiate) on Mar 10, 2004 at 18:44 UTC
    Thank you first off, Secondly, I think my problem may be were I am putting these lines. I don't have any success. The particular field I need is the  print MAIL "<font color=\"#FF0000\"><b>US Citizen? </b>$FORM{'ckusyes'} $FORM{'ckusno'}</font><br>"; If the 'chusno' field is selected then either add a recipient or change the recipients all together.
      That is too late. You need to check  $FORM{'ckusno'} BEFORE you  open(MAIL ... and alter the value of $recipients then. You can still re-use the variable in the body of the email message, but you need to know who to send the message to before you start to send the message.

      - - arden.

        How do you check the value prior to putting this in the body?
        ARDEN, Thank you again for your help. I have tried a few things and everytime I make some changes it does not recognize the CGI when I submit the form. As mentioned above, how do I declare the values of the check boxes before the open(mail..? Thanks in advance.
        Sorry, The last questions was me, forgot to login.
        Arden, You will have to forgive me a little. I inherited this from our perl expert who has left our company. I am a .net programmer with little experience on the CGI front. I have managed to get the basics running but taking these a step further has proven to be a little bit of a challenge.