i have this example code:
while ($row = mysql_fetch_object($result1)) {
echo \'
If there is no radio button selected the radio button will not be added to the serialized string. In this case we can make a workaround by adding another one exactly like the following:
<input type="radio" name="vote" value="" checked style="display:none;">
$("[name='vote']:checked").val()
will get you the value of the selected radio button.
$("#submit_js").click(function() {
$.post(
"user_submit.php",
{vote: $("[name='vote']:checked").val()},
function(data){
});
});
Jquery serialize is the best way to do this kind of things: http://docs.jquery.com/Ajax/serialize
$("#submit_js").click(function() {
$.post(
"user_submit.php",
$("form").serialize(),
function(data){
});
});