Jump to content

Help with php specific email?


bcvan2004

Recommended Posts

I don't know if anybody can help me out with this, but I'm trying to set up a system where a user fills out a form and the info gets sent to a database as well as an email sent out to a specific person depending on what is filled out in the form.  I know how to get the info sent to a database, but the email is pretty complicated.  Here is the scenario - I have 5 sales people and depending on what a user fills out on a form like a zipcode, an email would go to that specific sales person for that region.  Is there anyway to do this or a program that can do this?  This is driving me crazy... 

Thanks!
Link to comment
Share on other sites

[quote author=ryanlwh link=topic=101312.msg400856#msg400856 date=1153435631]
is there a way to figure out the sales person for a region? are the information stored in the database?
[/quote]

Thanks for the response - I'm not sure what you mean - I'm pretty much a newbie at this.  I basically wanted to try and set up a form that a user would fill out that when submitted an email with the form contents would go to a specific sales person depending on what zip code was filled out.  No - the sales persons info is not in a database - is that something I would need to set up?  Sorry if I sound like such a novice - thanks for any help...
Link to comment
Share on other sites

you can always hardcode the salesperson and region mapping. that doesn't matter. if you're okay with hardcoding then try this:

[code]
switch($zipcode)
{
  case 90001:
    $sales = 'losangeles@company.com';
    break;
  case 90210:
    $sales = 'beverlyhills@company.com';
    break;

}
[/code]
Link to comment
Share on other sites

[quote author=ryanlwh link=topic=101312.msg400869#msg400869 date=1153436521]
you can always hardcode the salesperson and region mapping. that doesn't matter. if you're okay with hardcoding then try this:

[code]
switch($zipcode)
{
  case 90001:
    $sales = 'losangeles@company.com';
    break;
  case 90210:
    $sales = 'beverlyhills@company.com';
    break;

}
[/code]
[/quote]

Thanks - I'll see what I can do - Do you know of any tutorials or books that show how to do something like this?  Thanks for your time....


Link to comment
Share on other sites

Hi - I'm still having problems with this.  Is there any tutorial or script that I can look at that can show me how something like this is done?  Nothing happens when I try and set it up so it emails to a specific person...  Thanks...
Link to comment
Share on other sites

Okay. When I first started and came here, I would get answers like that as well. They are valid answers that specifically address the single action you said you wanted ... BUT, they assume you know everything else related what you want to do. You said you know how to send form values to a database. Do you really? If so you don't have much else to learn. But answer this, first:

Do you know how to pass values from a form to a PHP processing page ?
Do you know how to accept and process values (and, if any, hidden variables) using a php processing page?
Do you know how to create the values/variables into an email format using a php processing page?

If not, you have 2 pages to create:

1. Form page
2. php processing page
Link to comment
Share on other sites

[quote author=dbrimlow link=topic=101312.msg401287#msg401287 date=1153500279]
Okay. When I first started and came here, I would get answers like that as well. They are valid answers that specifically address the single action you said you wanted ... BUT, they assume you know everything else related what you want to do. You said you know how to send form values to a database. Do you really? If so you don't have much else to learn. But answer this, first:

Do you know how to pass values from a form to a PHP processing page ?
Do you know how to accept and process values (and, if any, hidden variables) using a php processing page?
Do you know how to create the values/variables into an email format using a php processing page?

If not, you have 2 pages to create:

1. Form page
2. php processing page
[/quote]

Thanks for the info....
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.