Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

Sending Email to Different Address Based on Certain Criteria

the mail() function

Moderators: macek, egami, gesf

Sending Email to Different Address Based on Certain Criteria

Postby FriarTuck00 » Thu Dec 06, 2012 8:12 am

I'm a PHP newbie, so please bear with me.

We have some PHP script on our site for when visitors fill out the different forms on the site. On our Contact Us form, site viewers can select which of our two locations they are interested in.

What I'm looking for is how I can code it so that if a viewer selects Location "A", the email goes to email address "a" and if the viewer selects Location "B", the email goes to email address "b".

Thanks!
FriarTuck00
New php-forum User
New php-forum User
 
Posts: 1
Joined: Thu Dec 06, 2012 7:59 am

Re: Sending Email to Different Address Based on Certain Crit

Postby egami » Fri Dec 14, 2012 8:46 am

if ($_POST['whatever'] == 'A') {
$email = "thisemail@address.com";
} elseif ($_POST['whatever'] == 'B') {
$email = "theotheremail@address.com";
} else {
$email = "defaultemail@address.com";
}


done.
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2197
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Sending Email to Different Address Based on Certain Crit

Postby harekumar » Tue Dec 18, 2012 10:18 pm

The best way to send emails to any address just use the if else condition to identify the user response. And once you get the user response then use mail() function to do your stuff.
harekumar
New php-forum User
New php-forum User
 
Posts: 1
Joined: Tue Dec 18, 2012 10:13 pm

cheap herve leger dresses cheapest Herve Leger on

Postby galloway8 » Sun May 12, 2013 6:53 am

Imaginative play should be encouraged and fostered in children because not only is it fun for them but it is also a significant part of growing up and learning. Playing through imagination is an essential part of childhood. Through this, the child learn more about the world and about himself and may lay the groundwork for one's future.
But not too many children are encouraged to utilize their imagination through play. There are 3 important ways to bring about imaginative play in your child?by allowing them the time, the supplies and the time. Do your kids have the time for imaginative play? It?s quite remarkable how many very young children have a very full schedule ahead.
It?s not really desirable that each moment of their day be planned and totally structured. Though some of these activities are most likely required, such as day care or school and some are also desirable like clubs or organizations and sports, it?s also essential that the child will be given the chance for free and unstructured amusement herve leger nyc which gives the opportunity for imaginative fun.
Children who aren?t provided the chance to explore and exercise their imagination might run purple herve leger dress the risk of losing the skill to use it at all. Do your children have the necessary supplies for cheap [url=/]herve leger bandage dresses[/url] imaginative [url=/]herve leger nordstrom[/url] play? As we realize from our own childhood experience that imaginative fun does not really require elaborate and expensive supplies and try not to be so suggestive in their use.
A complex wardrobe is not required but a few things can be of useful help. A cardboard box may be anything from a race car to a treasured chest. A cardboard tube from a wrapping paper might be a spyglass, a container for a secret map or a sword. In addition, a bath towel can be a superhero?s cape or swaddling for a baby, or could be a robe fir for a king.
Children would do better if they?re allowed to have their imagination run free without too much interference and control. Do your children have a place for imaginative play? Is there a place somewhere, even in the corner of a room, where they could shape play dough monsters or build a block city? Could they assemble all their cars into a parade or all their stuffed toys into a school? Try striking a balance between the children?s need for imaginative enjoyment and your need for order.
While the children should dresses herve leger be taught to pick up after themselves, often it may take a while to create the city of their dreams and they need time to play with it again. Allow them a day or so to make a complex setting for their imaginative play before compelling them to keep away their toys.
Imaginative play could be a great and interesting chance for your children to not only enjoy their childhood to the fullest but also to grow and develop as individuals by trying on various roles like cooks, herve leger blog parents, firefighters and police officers, and also to experience some adventures as explorers, kings and pirates.

Related articles:


herve leger skirt cheapest Herve Leger on sale (40

herve leger cheapest Herve Leger on sale (8)

herve leger pink dress cheapest Herve Leger on sal
galloway8
New php-forum User
New php-forum User
 
Posts: 127
Joined: Mon Jan 07, 2013 3:36 am


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.