Mail sending & HTML forms... - Programmers Heaven

Howdy, Stranger!

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

Categories

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.