html - PHP emailto form not processing? -
i have used php form on contact page doing second 1 , used same documents , changed them when click submit goes blank page. have looked through previous page , can not find difference in code yet, , driving me mad! im not pro nay stretch challenge myself out wifes business.
<?php if(isset($_post['email'])) { $email_to = "karly@kbwflowers.com.au"; $email_subject = "mothers day order form"; $arrangement = ""; $your_name = ""; $your_contact_number = ""; $email_from = ""; $mums_name = ""; $mums_contact_number = ""; $delivery_address = ""; $delivery_suburb = ""; $delivery_date = ""; $card_message = ""; $base = ""; $payment_method = ""; $total = ""; $email_message .= "your name: ".clean_string($your_name)."\n"; $email_message .= "mums name: ".clean_string($mums_name)."\n"; $email_message .= "email address: ".clean_string($email_from)."\n"; $email_message .= "your telephone: ".clean_string($your_contact_number)."\n"; $email_message .= "delivery date: ".clean_string($delivery_date)."\n"; $email_message .= "mums contact number: ".clean_string($mums_contact_number)."\n"; $email_message .= "delivery address: ".clean_string($delivery_address)."\n"; $email_message .= "card_message: ".clean_string($card_message)."\n"; $email_message .= "delivery suburb: ".clean_string($delivery_suburb)."\n"; $email_message .= "delivery date: ".clean_string($delivery_date)."\n"; $email_message .= "base: ".clean_string($base)."\n"; $email_message .= "payment method: ".clean_string($payment_method)."\n"; $email_message .= "total: ".clean_string($total)."\n"; // create email headers $headers = 'from: '.$email_from."\r\n". 'reply-to: '.$email_from."\r\n" . 'x-mailer: php/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- thank contacting --> <?php } ?>
your html form under url not contain input name email
thus if(isset($_post['email'])) {
never true, rendering empty page.
try change
if(isset($_post['email_from'])) { .... code } else echo "you haven't filled in form ...";
besides: if(isset($_post['email'])) {
not issue error messages on missing index. that's isset
supposed do.
Comments
Post a Comment