Page 1 of 1

RE: select box in formailer

Posted: Mon Apr 22, 2002 10:48 am
by johnh
hello all was wondering if anyone would know if it is possible to change the $toaddress in a form submission by what dropdown box is selected . kinda like
<?
if ($select==1)
toaddress ="lalala@yayaya";
elseif ($select==2)
toaddress="jjje@yadayada.com";
if ($select==0)
{ return;
echo"no box was selected";
{
?>

Posted: Mon Apr 22, 2002 10:53 am
by enygma
personally I'd just use a switch:

Code: Select all

switch($input)&#123;
  case "1": $to="me@me.com"; break;
  case "2": $to="you@you.com"; break;
  case "3": $to="them@them.com"; break;
&#125;
-enygma

Posted: Mon Apr 22, 2002 11:01 am
by johnh
8) cool will try that .with any luck the form may be smarter...LOL