Forum Moderators: coopster
I'm using Flash (AS2) to do my form and I send data using LoadVars to PHP. Here's the pseudocode for what I'm trying to do. (I'm not sure if the syntext is correct). PLease help me write this complete code.
where $list = "abc" then $email = "asdf@domain1.com"
where $list = "xyz" then $email = "qwer@domain2.net"
where $list = "def" then $email = "xcvb@domain3.org"
(repeated 30 times for 30 email addresses!)
I hope that make sense! I'd preffer to have the code because I'm NOT a PHP gal at all!
I think a switch [us2.php.net] statement will be ideal for what you are trying to accomplish.
switch ($list) {
case 'abc':
$email = "asdf@domain1.com";
break;
case 'xyz':
$email = "qwer@domain2.net";
break;
case 'def':
$email = "xcvb@domain3.org";
break;
}
Hope that helps.
dc