I have searched this board and others, I have looked through my books and I can not figure this out. I have tried at least a dozen variations and none of them seem to work. I have a form that is on an html page. When the user submits it, it sends an email to person 'A', but if they select a checkbox then a copy has to also go to person 'B', but only if the box is checked. I figured I could just put the php in the form to create the hidden input, not getting it.
<input type=hidden name="mailformFromEmail" value="cathos@cape.com">
<input name="mailformFromName" type=hidden value="Frequent Guest Card">
<input type=hidden name="mailformToEmail" value="kleblanc@cape.com">
<?php $toss = 'merlin@cape.com';
if ($add_birthday){
'<input type=\"hidden\" name=\"mailformToEmail2\" value=\"$toss\">';
} ?>
<input type=hidden name="mailformURL" value="order_thanks.php">
<input type=hidden name="mailformSubject" value="Frequent Guest Card Order">
At one point this is what was getting returned in the email:
ToEmail2 = <?php $toss = 'merlin@cape.com';if
($add_birthday){print $toss;} ?>
This was using one of the earlier variations that I tried. I have tried single quotes and double, escaped and not escaped. I tried setting just the value to a variable, I have tried setting the whole input with php, plus a whole lot of other ways. I could really use some help here and would greatly appreciate the input.
Thanks