How to insert the value of dynamically radio button using PHP?
<p>I have a html table, each table row have a radio button dynamically generated. Each option in the radio button have a unique id that generated dynamically also. But this id is not yet save in the database.</p>

<p>How to insert the option id? And how to update the option answer in that option id? Please help me. I tried to insert the values but I have no luck</p>

<p>Scenario:</p>

<p>There's a default value for the radio button, which is "No". When the user change the default value, there's a confirmation box that will ask the user if he/she want to processed. If the user click "Ok" the default value will change into "Yes".</p>

<p>PHP for html table:</p>

<pre><code>    echo '&lt;td id="resumeFile'.$optionId.'"&gt;' . $record_s-&gt;attachment_resume_id . '&lt;/td&gt;';
    echo '&lt;td id="processedYes&gt;&lt;label for="Yes"&gt;Yes&lt;/label&gt;
              &lt;input type="radio" id="processedOptionYes'.$optionId.'" name="processedOption" value="Yes" onclick="proccessedCheck('.$optionId.',\'Yes\')"/&gt;
              &lt;label for="No"&gt;No&lt;/label&gt;
              &lt;input type="radio" id="processedOptionNo'.$optionId.'" name="processedOption" value="No" checked="checked" onclick="proccessedCheck('.$optionId.',\'No\')" echo $record_s-&gt;process_resume === "No" checked="checked"/&gt;/&gt;No&lt;/td&gt;';
    echo '&lt;/tr&gt;';
        }
    echo '&lt;/table&gt;';
}

if (isset($_POST['optionId']) &amp;&amp; $_POST['optionId']){
    $optionId = $_POST['optionId'];
    $queryOptionId = $wpdb-&gt;query("INSERT INTO resume_databank(process_resume_id) VALUES ('$optionId')");
}
</code></pre>

<p>Hidden Form:</p>

<pre><code>&lt;form id='hiddenForm' method='POST' action=''&gt;
    &lt;input type="hidden" id="inputHidden1" name="optionId" /&gt;
    &lt;input type="hidden" id="inputHidden2" name="optionAnswer" /&gt;
&lt;/form&gt;
</code></pre>

<p>JS:</p>

<pre><code>function proccessedCheck(optionId,optionAnswer){
    if(optionAnswer == 'Yes'){
        if (confirm('You have chosen ' + optionAnswer + ', is this correct?')){
            jQuery("#processedOptionYes" + optionId).attr('disabled',true);
            jQuery("#processedOptionNo" + optionId).attr('disabled',true);
            var withlink = jQuery("#resumeFile"+ optionId).html();
            var withoutlink = jQuery(withlink).html();
            jQuery("#resumeFile"+optionId).html("").append(withoutlink);
            jQuery("#inputHidden1").val(optionId);
            jQuery("#inputHidden2").val(optionAnswer);
            jQuery("#hiddenForm").submit();
        }
    }
}
</code></pre>