i have form:
PHP Code:
</fieldset>
<fieldset>
<legend>Comments</legend>
<p>
<label for="Message">Message:</label>
<textarea id="message" name="message" rows="" cols="" ></textarea>
</p>
<p>
<label for="CC">Send A Copy To Me:</label>
<input id="CC" name="CC" type="checkbox" value="" />
</p>
<br />
<p>
<input type="submit" id="Submit" name="Submit" value="Send Now" />
</p>
</fieldset>
</form>
the questions is if the check box id="CC" is checked i want to send it CC to same email address entered. i need to someway make if CC is checked than CC = email. any suggestions
PHP Code:
if (!empty($_REQUEST['email'])) {
$email = $_REQUEST['email'];
} else {
$email = NULL;
echo '<p><font color="red">You forgot to enter your email address!</font></p>';
}
if (isset($_REQUEST['CC'])) {
$CC = $_REQUEST['CC'];
} else {
$CC= NULL;
}
// EMAIL
$headers = "From: {$_POST['email']}" . "\r\n";
$headers .= "Cc: {$_POST['CC']}" . "\r\n";
$headers .= "Bcc: k******@comcast.net" . "\r\n";
Bookmarks