footercontact.php won’t autofill
-
Hello,
I have the following footer contact form that will not google autofill. it also autoresponds email with [email protected] as the from email name and address. Can anyone tell me how to revise the form to 1) autofill and 2) have the autoresponse email from [email protected]?
Thanks,
Greg<?php
$to = ‘[email protected]’;
$from = $_REQUEST[’email’] ;
$name = $_REQUEST[‘name’] ;
$headers = “From: $from”;
$subject = “Web Contact Data”;$fields = array();
$fields{“name”} = “Name”;
$fields{“email”} = “Email”;
$fields{“message”} = “Message”;$body = “We have received the following information:\n\n”; foreach($fields as $a => $b){ $body .= sprintf(“%20s: %s\n”,$b,$_REQUEST[$a]); }
$headers2 = “From: BuildersEngineering.com”;
$subject2 = “Thank you for contacting us”;
$autoreply = “Thank you for contacting us. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at https://www.buildersengineering.com”;if(($from == ”) || ($from == ‘Email’)) {echo “You have not entered an email, please go back and try again”;}
else {
if(($name == ”) || ($name == ‘Name’)) {echo “You have not entered a name, please go back and try again”;}
else {
$send = mail($to, $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
if($send)
{header( “Location: https://www.buildersengineering.com/home/?page_id=334” );}
else
{print “We encountered an error sending your mail, please notify [email protected]”; }
}
}
?>
- The topic ‘footercontact.php won’t autofill’ is closed to new replies.