bcvan2004 Posted July 20, 2006 Share Posted July 20, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/ Share on other sites More sharing options...
ryanlwh Posted July 20, 2006 Share Posted July 20, 2006 is there a way to figure out the sales person for a region? are the information stored in the database? Quote Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/#findComment-61402 Share on other sites More sharing options...
bcvan2004 Posted July 20, 2006 Author Share Posted July 20, 2006 [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... Quote Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/#findComment-61409 Share on other sites More sharing options...
ryanlwh Posted July 20, 2006 Share Posted July 20, 2006 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 Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/#findComment-61412 Share on other sites More sharing options...
bcvan2004 Posted July 20, 2006 Author Share Posted July 20, 2006 [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.... Quote Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/#findComment-61417 Share on other sites More sharing options...
bcvan2004 Posted July 21, 2006 Author Share Posted July 21, 2006 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... Quote Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/#findComment-61461 Share on other sites More sharing options...
bcvan2004 Posted July 21, 2006 Author Share Posted July 21, 2006 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... Quote Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/#findComment-61705 Share on other sites More sharing options...
dbrimlow Posted July 21, 2006 Share Posted July 21, 2006 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 page2. php processing page Quote Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/#findComment-61719 Share on other sites More sharing options...
bcvan2004 Posted July 21, 2006 Author Share Posted July 21, 2006 [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 page2. php processing page[/quote]Thanks for the info.... Quote Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/#findComment-61753 Share on other sites More sharing options...
bcvan2004 Posted July 22, 2006 Author Share Posted July 22, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/15201-help-with-php-specific-email/#findComment-62180 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.