Sendmail script help needed

Sendmail script help needed

I am trying to create a contact form which allows the user to select a person and have the message be sent to the selected person only. I know how to send a message on success, but I don't know how to write the if, else, etc. to have messages go to a specific person. I talked to one of y'all on the phone and he was going to send me a sample script. Perhaps I missed it. Could you direct me to a sample? Thanks.