Jump to content


Photo

Help with php specific email?


  • Please log in to reply
9 replies to this topic

#1 bcvan2004

bcvan2004
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 20 July 2006 - 10:45 PM

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!

#2 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 20 July 2006 - 10:47 PM

is there a way to figure out the sales person for a region? are the information stored in the database?
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#3 bcvan2004

bcvan2004
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 20 July 2006 - 10:57 PM

is there a way to figure out the sales person for a region? are the information stored in the database?


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...

#4 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 20 July 2006 - 11:02 PM

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

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

Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#5 bcvan2004

bcvan2004
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 20 July 2006 - 11:07 PM

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

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


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....




#6 bcvan2004

bcvan2004
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 21 July 2006 - 02:13 AM

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...

#7 bcvan2004

bcvan2004
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 21 July 2006 - 03:58 PM

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...




#8 dbrimlow

dbrimlow
  • Members
  • PipPipPip
  • Advanced Member
  • 712 posts

Posted 21 July 2006 - 04:44 PM

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
Dave

I am always amazed by no matter how much I know, I know I don't know as much as I thought I knew.  - D. Brimlow.

#9 bcvan2004

bcvan2004
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 21 July 2006 - 05:52 PM

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


Thanks for the info....

#10 bcvan2004

bcvan2004
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 22 July 2006 - 08:53 PM

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....orms/forms3.php




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users