This is a html issue. Getting the blahblah@ part from the <option> is easy. The option is part of a select right? - So you get the option selected by refering to the select by name - as you would any other form element.
EG say your select is like this:
<select name=“myselect”>
<option>…
</select>
You access it like this: $_POST[‘myselect’];
I must highly recommend something to you though: DO NOT use a select box in the way you are intending - with REAL email addresses. It will be easily abused and probably get the site shut down. Any spammer who stumbles onto it will see that your script will email anyone by any email address provided in the form. They’ll then either save the page and edit it and send mail one by one manually or worse use a bot which will simply submit the form with its own values.
Instead, keep a list of email addresses in the script hard coded in an array and put their array index into the <option> value instead. When the form is submitted get the correct email address from the index and then email that address.
If you need further explanation of this then please say so.
thanks for the help…one thing though about the hardcoding…is this something i can do in a database as in just shove a bunch of email address into my mysql database or should i just hard code the email address at the top of the script
What I would do is instead of having the legal dept’s e-mail as the value, set the value as law or something. Then do a switch statement to adjust the e-mail.