2
Good morning guys, can anyone help me with the following problem, i want to send data of two fields, one of type text and the other of type select option and I want when I click on select to do post. there is my code
HTML
<form method="post" action="">
<input type="text" name="nome" onChange="Enviar(this.value);" >
<select name="sexo" onchange="">
<option value="">selecionar...</option>
<option value="M">M</option>
<option value="F">F</option>
</select>
</form>
Javascript
<script>
function getState() {
$.ajax({
method: "post",
url: "pag.php",
data: $("#form").serialize(),
});
}
</script>
And on page.php
PHP
But it’s not working