473,795 Members | 3,279 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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>

Feb 27 '07 #1
1 1370
sc******@gmail. com kirjoitti:
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ö
sp**@outolempi. net | Gedoon-S @ IRCnet | rot13(xv***@bhg byrzcv.arg)
Feb 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2081
by: jason | last post by:
I could sure use some conceptualization and query help with a Page Watch System I am building in Access 2000 and Asp. I need to cycle through databae and generate a compiliation query email that notifies a person of yacht(s) that have changed on our website: Key database tables ---------------------------------------------------------------------------- Customer (1) --->> (many) Customer_Boats (many)<<---- Boat (1)
3
2304
by: elhombrebala | last post by:
With this script I can force the user to select the checkbox befor continuing, but now I have a menu with lots of radio unputs and I woul like the user to select at least 2 of them; how can I check it? <form name=formulario> <INPUT type=checkbox name=casilla> <INPUT type=button value="Salir" onclick="Goingout()"> </form>
4
3020
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email User1@here.whatever and User4@here.whatever but if "Loaded" is chosen it needs to email User2@here.whatever and User3@here.whatever, etc, etc... I'm aware that the only thing that really needs to change is the "Mail.AddAddress" line (at least...
1
1790
by: Verner Vaz | last post by:
Select Email ID based on 'a' selected radio button Hello there, I have a simple form with some fields to be filled in and when submitted is emailed to a couple of email ID. Now, this form has 10 radio buttons of which only one can be selected at any time.
5
2735
by: sifar | last post by:
Hi, This is my first post to this Group. A] I am trying to create a escalation page which will mail an escalation report of a faulty product. Items needed on Page: -----------------------
3
2479
by: Ferret Face | last post by:
Hello, I have a web page that gets the user to select items from a list of options. This list is a set of independant Radio Buttons. I did not use a Radio Button List because I wanted the possibility of multiple selections. However, one item is "None of the above" and I have placed some logic (autopostback, etc.) that will remove all previous selections if "None of the above" is chosen. My problem is this: This list of Radio Buttons...
1
1943
by: sluster | last post by:
I've got a section of a website that I currently use to perform a search for users. My boss wants that section to have the option of being 1 of 3 different searches (search our webpage; search our catalog; search using this webtool we use). What I'd like to do is essentially an If/ElseIF (or Case/Select if you prefer) idea based on the user selecting one of 3 choices from the radio buttons (so if they click the "search web page" button all of...
10
6106
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio button with this link of code: echo 'SCRIPT language=JavaScript setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //? <snip of code>
1
1930
by: scanreg | last post by:
My form needs to (1) direct to specified URLs based on a combination of form selections and (2) enable/disable form features based on selections within the form FORM Radio 1 - A - B - C Select Box 1
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9037
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.