Submit in form BootStrap does not pass data via post!

0

Hello, I have a html form using bootstrap, but I can not send via post. * detail, form without using style bootstrap goes smoothly. follow my form:

<div class="row contact-wrap"> 
                <div class="status alert alert-success" style="display: none"></div>
                <form id="main-contact-form" class="contact-form" name="contact-form" method="post" action="sendemail.php">
                    <div class="col-sm-5 col-sm-offset-1">
                        <div class="form-group">
                            <label>NOME *</label>
                            <input type="text" name="name" class="form-control" required="required">
                        </div>
                        <div class="form-group">
                            <label>EMAIL *</label>
                            <input type="email" name="email" class="form-control" required="required">
                        </div>
                        <div class="form-group">
                            <label>TELEFONE *</label>
                            <input type="number" name="telephone" class="form-control" required="required">
                        </div>
                        <div class="form-group">
                            <label>NOME DA EMPRESA</label>
                            <input type="text" name="employer" class="form-control">
                        </div>                        
                    </div>
                    <div class="col-sm-5">
                        <div class="form-group">
                            <label>ASSUNTO *</label>
                            <input type="text" name="subject" class="form-control" required="required">
                        </div>

                        <div class="form-group">
                            <label>SUA MENSAGEM *</label>
                            <textarea name="message" id="message" required="required" class="form-control" rows="5"></textarea>
                        </div>                        
                        <div class="form-group">
                            <input type="submit" name="submit" class="btn btn-info btn-lg" required="required" value="ENVIAR">
                        </div>
                    </div>
                </form> 
            </div>
    
asked by anonymous 04.08.2017 / 17:04

1 answer

1

Try to go in your php and do this:

<?php
   $nome = $_POST['name'];
   print_r($nome);
?>

It was as mentioned in the commentary but only tested. Remember that in php when you submit a form, you have to use the field name instead of the ID.

    
04.08.2017 / 17:23