Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
09-22-2005, 09:04 PM #1
PHP Mail - I'm having some troubles figuring out how to get variables/infomation
I'm using PHPFormMail from www.boaddrink.com I was told that a lot of folks are using this one.
Any way I'm having some problems trying to figure out how to do this. I have a form code below.
The formmail.php script excepts email (from), recipient (to), recipient_cc (CC). I've set my form up and it works fine, but I wanted to add a (CC) so that the person filling out the form will get a copy also.
How can I get the value from the input field email into input value for recipient_cc. I figured the way i have it wouldnt work value=".$_POST['email'].'"
I would prefer to have this handled in the submit form and to not go into the formail.php and make changes (IE:
$mail_header .= 'Cc: ' . $form['recipient_bcc']
$mail_header .= Cc: ' . $form['email'])
since i use formail.php with multiple contact type forms.
echo '<form method="POST" action="../scripts/formmail.php" onSubmit="" name="contact_form" id="contactform">'; echo '<input type="text" id="cform" name="email">'; echo '<input type="hidden" name="recipient" value="email@example.com">'; echo '<input type="hidden" name="recipient_cc" value="'.$_POST['email'].'">';