Error in PHP form I get the form without the information

1

I receive the email however, I do not receive the information. Need help.

<div class="formArea row m0">


    <form action="contact_process.php" class="row m0 contact_form" id="contactForm">
        <div class="col-sm-6">
            <div class="row m0">
                <label for="contact_name">Name <span>*</span></label>
                <input type="text" class="form-control" name="contact_name" id="contact_name" required>
            </div>
            <div class="row m0">
                <label for="contact_phone">Phone</label>
                <input type="tel" class="form-control" name="contact_phone" id="contact_phone">
            </div>
            <div class="row m0">
                <label for="monthly_badget">Monthly Budget</label>
                <select name="monthly_badget" id="monthly_badget" class="selectpicker form-control">
                    <option value="0" disabled selected>-(Monthly Budget)-</option>
                    <option value="200">200 USD</option>
                    <option value="300">300 USD</option>
                    <option value="400">400 USD</option>
                    <option value="500">500 USD</option>
                </select>
            </div>
        </div>
        <div class="col-sm-6">
            <div class="row m0">
                <label for="contact_email">Email <span>*</span></label>
                <input type="email" class="form-control" name="contact_email" id="contact_email" required>
            </div>
            <div class="row m0">
                <label for="contact_url">Website <span>*</span></label>
                <input type="url" class="form-control" name="contact_url" id="contact_url" required>
            </div>
            <div class="row m0">
                <label for="learn_seowave">How did you learn about SEOWAVE</label>
                <select name="learn_seowave" id="learn_seowave" class="selectpicker form-control">
                    <option value="0" disabled selected>-(Select)-</option>
                    <option value="google">Google Search</option>
                    <option value="yahoo">Yahoo Search</option>
                    <option value="blog">Blog</option>
                    <option value="forum">Forum</option>
                </select>
            </div>
        </div>
        <div class="col-sm-12">
            <div class="row m0">
                <label for="interested_in">Which services are you interested in?</label>
                <select name="interested_in" id="interested_in" class="selectpicker form-control">
                    <option value="off_page">Off Page Optimization</option>
                    <option value="on_page">On Page Optimization</option>
                </select>
            </div>
        </div>
        <div class="col-sm-12">
            <div class="row m0">
                <label for="addInfos">Additional Information</label>
                <textarea name="addInfos" id="addInfos" class="form-control"></textarea>
            </div>
        </div>
        <div class="col-sm-12 text-center">
            <button class="borderred_link" type="submit"><span>submit details!</span></button>
        </div>                            
    </form>    

PHP

<?php

    $to = " [email protected] ";
    $from = $_REQUEST['contact_email'];
    $name = $_REQUEST['contact_name'];
    $headers = "From: $from";
    $subject = "Você tem  mensagem do seu formulário";

    $fields = array();
    $fields{"name"} = 'contact_name';
    $fields{"email"} = 'contact_email';
    $fields{"url"} = 'contact_url';
    $fields{"phone"} = 'contact_phone';
    $fields{"Monthly Budget"} = "monthly_badget";
    $fields{"How know about SEOWAVE"} = "learn_seowave";
    $fields{"Interested In"} = "interested_in";
    $fields{"Additional Information"} = "addInfos";

    $body = " Aqui está o que foi enviado:\n\n "; foreach($fields as $a => $b){   $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }

    $send = mail($to, $subject, $body, $headers);

?>
    
asked by anonymous 19.02.2018 / 16:19

1 answer

0

In the form, switch the method to POST :

<?php
mail("[email protected],[email protected],[email protected],[email protected],[email protected]","Assunto","Corpo");
?>

There is every comma place a different e-mail address, being from different providers, put in a gmail 3, a 4 outlook / hotmail, etc., fill in with all possible emails being each from a different provider , check in all the inbox and SPAM box (more plausible), if at least one of them receive the email problem is not in your provider but in the email service.

If no one receives and can not change hosting you will have to use PHPMailer for authentication (the SMTP settings provided by the hosting support are mandatory), and if that does not work, you do not have I am going to pass an instruction on how to use a free third party service to send the email with or without AJAX (javascript) so that the user does not see the address of the service giving the impression that the form sent by the your site.

    
19.02.2018 / 17:47