Form to email help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
iprint
Forum Newbie
Posts: 1
Joined: Mon Feb 14, 2011 3:40 pm

Form to email help

Post by iprint »

Hi,
I need help with form that sends info to 2 different email addresses depending what location is selected on the form.
Form and php file attached.
Attachments
registration.zip
(5.66 KiB) Downloaded 65 times
pburgh
Forum Newbie
Posts: 13
Joined: Mon Feb 14, 2011 3:14 pm
Location: Boston

Re: Form to email help

Post by pburgh »

Why not use a dropdown for the two locations and then set the TO field in the email to that value on POST/GET?

Or, on POST, something clumsy like

Code: Select all

if($_POST['location'] = 1) {
      $to = "email@email.com";
}
else {
      $to = "email2@email.com";
}
User avatar
ganesh_dabhade
Forum Newbie
Posts: 19
Joined: Sun Feb 06, 2011 12:42 am
Contact:

Re: Form to email help

Post by ganesh_dabhade »

Yes, this is better solution if u want to send msg to one address.
Post Reply