Jump to content

Archived

This topic is now archived and is closed to further replies.

bcvan2004

Help with php specific email?

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!

Share this post


Link to post
Share on other sites
is there a way to figure out the sales person for a region? are the information stored in the database?

Share this post


Link to post
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...

Share this post


Link to post
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]

Share this post


Link to post
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....


Share this post


Link to post
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...

Share this post


Link to post
Share on other sites
Can anybody help me with this or point me to a script or program that can do something like this - I've tried doing what the previous poster said, but I'm not skilled enough to know what I'm doing to get it to work? Thanks...


Share this post


Link to post
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

Share this post


Link to post
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....

Share this post


Link to post
Share on other sites
I found a pretty good basic tutorial if anybody else is trying to something similar to this - you can see it here:

http://www.apptools.com/phptools/forms/forms3.php

Share this post


Link to post
Share on other sites

×

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.