I'd like to know how to send a request to the database. in fact not a request but an insert for when I click on radio button
it enter the value of radio button
on the bank how do I do that?
I'd like to know how to send a request to the database. in fact not a request but an insert for when I click on radio button
it enter the value of radio button
on the bank how do I do that?
1 - set an ID for your form eg
2 - Use javascript
$(".classeDoRadio").click(function(){
$("#idDoForm").submit();
});
You can do the way @MGregor suggested, that submit will automatically call the action page.
See an example code quoted in operation:
$(document).ready(function() {
$("#meuRadio").on('change', function() {
alert('oi');
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script><formid="meuForm" method="post" action="minhaPagina.php">
<input type="radio" name="meuRadio" value="6" id="meuRadio" /><label>opcao</label>
</form>
In place of alert
You will insert the line $("#meuForm").submit();
that the form will be submitted to the page that is in the action, in this case it will execute minhaPagina.php
.