I have the following select list:
<form action="mail.php" method="POST">
<select name="foo" id="foo">
<option value="sales">Sales</option>
<option value="salesAssist">Sales Assist</option>
<option value="billing">Billing</option>
<option value="billingAssist">Billing Assist</option>
</select>
</form>
I need to route the $mailTo variable depending on which option they select, Sales and Sales Assist go to
[email protected], while Billing and Billing Assist go to
[email protected]
PHP pseudeo code!
<? php
$_POST['foo'] if inArray(sales, salesAssist) foo="
[email protected]";
else if inArray(billing, billingAssist) foo="
[email protected]";
mailTo="foo"
?>
I know there is nothing correct about the above, but you can see what I am trying to do, change a variable's value based on the selected value. I don't want to do this with JS, would rather learn more PHP here. Thank you.