Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Mail sending & HTML forms...

First, is this the right way to determine which radio button in a form is checked?



if ($fields{'choice'} eq "choice1")

{ &send_1; exit; }

if ($fields{'choice'} eq "choice2")

{ &send_2; exit; }



Second, if i have a form submitting the first half of a e-mail address (the part before @), how do i add the part after the @ if i know the domain?



Thanks...


Comments

  • Hi!



    : First, is this the right way to determine which radio button in a form is checked?

    :

    : if ($fields{'choice'} eq "choice1")

    : { &send_1; exit; }

    : if ($fields{'choice'} eq "choice2")

    : { &send_2; exit; }

    That looks correct to me. As long as the radio buttons carry the values "choice1" and "choice2"!



    : Second, if i have a form submitting the first half of a e-mail address (the part before @),

    : how do i add the part after the @ if i know the domain?

    I would probably use the . to join the two together. For example, if the first half was stored in the variable $address, you would do something like this:

    $address = $address."@domain.com";

    (Remember to put @ instead of just @, or it thinks @domains is an array - not good!)



    Hope this helps - drop me an email if you have any more problems!



    J. Worthington


    URL:http://www.downloadcounter.com/

Sign In or Register to comment.