Need Script or Technique to send Web Form data to different Email Addresses

Hi all - I need a Script or Technique to take Web Form data THEN execute 2 diff MailForm scripts (or 2 parts of the same script) depending on the Zip Code that a User enters into the Reply Form via a Browser.
RIght now, am using Linux/Apache web server and (forgive the big word) that ubiquitous MSA "Matts Script Archive" Form Script

I suppose I could either call 2 diff mail form scripts with some PHP code inside the HTML page ... or use some modified code onside the form script itself ...

Any suggestions?
Brian
LVL 1
bleggeeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Amar BardoliwalaCommented:
Hello blegee,

According to me when form submits you can check for Zip Code and depending on Zip Code entered by User you can run mail script that you want.

Hope this will help you.

Thank You.

Amar.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xtermCommented:
Here you go, pretty simple.
<html>
<!-- This is form.html -->

<form method=post action=zipcode.php>
Enter your zipcode:<input name=zipcode>
<input type=submit value=Submit>
</form>

</html>

Open in new window

<?php
// This is zipcode.php

$zipcode=$_POST["zipcode"];

if($zipcode) {
        switch($zipcode) {
                case "11111":   mail($rcpt1,$subject1,$body1,$from); break;;
                case "22222":   mail($rcpt2,$subject2,$body2,$from); break;;
                default:        echo "Unrecognized zip code<br>\n"; 
        }
        echo "<a href=form.html>Back</a><br>\n";
} else {
        Header("Location: form.html");
}

?>

Open in new window

0
bleggeeAuthor Commented:
Thank you, folks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.