Answer the question
In order to leave comments, you need to log in
How to determine the clicked radio using jquery?
and then you need to send it to a php variable
Answer the question
In order to leave comments, you need to log in
Or maybe instead of inventing the wheel, use $('#myForm') .serialize() , and send data from the entire form?
<form method="post" id="color_send">
<label><input type="radio" name="color" value="1" /> красный</label>
<label><input type="radio" name="color" value="2" /> черный</label>
<input type="submit" name="send" value="Отправить" />
</form>
<script>
$(function () {
$('#color_send').submit(function () {
$.post('/send.php', $(this).serialize());
return false;
});
});
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question