Error sending form. This simple code is not working

-1
<form>
<div class="row">
    <div class="col-sm-12 form-group">
        <input class="form-control" id="name" name="name" placeholder="Nome" type="text" required>
    </div>
</div>
<div class="row">
    <div class="col-sm-12 form-group">
        <input class="form-control" id="email" name="email" placeholder="Email" type="email" required>
    </div>
</div>
<div class="row">
    <div class="col-sm-12 form-group">
        <select class="form-control" name="subject" required>
            <option>Assunto</option>
            <option>Orçamento Materiais</option>
            <option>Sugestão</option>
            <option>Trabalhe Conosco</option>
            <option>Outro</option>
        </select>
    </div>
</div>                      
<div class="row">
    <div class="col-sm-12 form-group">
        <textarea class="form-control" id="message" name="message" placeholder="Mensagem" rows="8" required></textarea><br>
    </div>
</div>
<div class="row">
    <div class="col-sm-12 form-group">
        <button type="submit" class="btn btn-primary btn-block btn-lg" name="send" style="border-radius:0px;">ENVIAR</button>
    </div>
</div>
</form>

<?php
//Variáveis enviadas pelo formulário
$nome = $_POST["name"];
$emailUsuario = $_POST["email"];
$assunto = $_POST["subject"];
$sugestao = $_POST["message"];

//Testando
echo $nome;
echo "<br>";
echo $emailUsuario;
echo "<br>";
echo $assunto;
echo "<br>";
echo $sugestao;
echo "<br>";    
?>
    
asked by anonymous 28.04.2018 / 08:20

2 answers

-1

You forgot to put the action and method.

action="page where to go" method="POST"

    
28.04.2018 / 08:22
0

The Action attribute is missing with the page that will receive the form or will treat the form of this data and attribute of the method if it will be POST or GET

    
28.04.2018 / 10:31