Getting email To to include email field in form
I have a emailed form where a user fills in a field with an email address which is supposed to be included in the To recipient list. This seems like it should be easy, but I'm having a hard time with it. The code currently is
$RecipArray[$CurIndex ] = "".((isset($_POST["GuestEmail"]))?$_POST["GuestEmail"]:"") ."";
Can anyone tell me where I'm going wrong?