0
Colleagues
I have a form that I am using jquery to pass the values, but the value does not pass to the send.php file. See:
<form method="post" name="post" id="contact-form">
<div id="success"></div>
<label for="exampleInputEmail1">Matéria:</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-arrow-circle-right" aria-hidden="true"></i>
</div>
<input type="text" class="form-control" name="NovaMateria" maxlength="150" id="tirarEspacos">
</div>
</form>
<script type="text/javascript">
$('#submit').click(function() {
$.post("enviar.php", $(".contact-form").serialize(), function(response) {
$('#success').html(response);
$('#tirarEspacos').val('');
});
return false;
});
</script>
send php.
<?php
echo $_POST['NovaMateria'];
Hello Glauber. Actually the button had, I forgot to put here, but the change of $("#contact-form"). serialize() worked.
– user24136