Support » Fixing WordPress » footercontact.php won’t autofill

  • Hello,

    I have the following footer contact form that will not google autofill. it also autoresponds email with 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


    $to = ‘’;
    $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:”;
    $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“;

    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);
    {header( “Location:” );}
    {print “We encountered an error sending your mail, please notify“; }

  • The topic ‘footercontact.php won’t autofill’ is closed to new replies.