Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 27th, 2007, 07:15 PM
schwooba@gmail.com
Guest
 
Posts: n/a
Default email person based on radio and select selections

Hello...I have an html form with radio and select controls that I want
to email to a user but can't quite grasp the way I should set this up.

If someone selects "a" and "milk" I want it to email abc. If they
select "a" and "cookies" it should go to xyz. Any help would be
appreciated.

input type="radio" name="type" value="a"
input type="radio" name="type" value="b"
input type="radio" name="type" value="c"

<select name="location">
<option>milk</option>
<option>cookies</option>
</select>

  #2  
Old February 27th, 2007, 08:55 PM
Kimmo Laine
Guest
 
Posts: n/a
Default Re: email person based on radio and select selections

schwooba@gmail.com kirjoitti:
Quote:
Hello...I have an html form with radio and select controls that I want
to email to a user but can't quite grasp the way I should set this up.
>
If someone selects "a" and "milk" I want it to email abc. If they
select "a" and "cookies" it should go to xyz. Any help would be
appreciated.
>
input type="radio" name="type" value="a"
input type="radio" name="type" value="b"
input type="radio" name="type" value="c"
>
<select name="location">
<option>milk</option>
<option>cookies</option>
</select>
>
if($_POST['type']=='a'){
if($_POST['location']=='milk'){
$reciever='abc';
} else if($_POST['location']=='cookies'){
$reciever='xyz';
}
... and so on...
}

then you just mail() to $reciever. No rocket science included.

--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles