如何在输入类型单选按钮中添加两个php条件?

My problem right now is that I have two conditions inside my radio buttons. Here's my current code. They work when they're used individually, but when they're together nothing happens.

<input type="radio" name="jsEnable" value="true" id="activatejs" 
onchange="enable_link();" onclick="checkBoxEnabling()"  <?php if 
(isset($_POST['jsEnable']) && $_POST['jsEnable']==="true") { 
$_POST['jsEnable'] = TRUE  echo "checked='checked'";}?> />

<input type="radio" name="jsEnable" value="false" 
id="donotactivatejs" onchange="disable_link();" 
onclick="checkBoxDisabling()" <?php if (isset($_POST['jsEnable']) && 
$_POST['jsEnable']==="false") { $_POST['jsEnable'] = FALSE; echo 
"checked='checked'";  }?> />

Can someone help? Anything wrong with my code? I am trying to convert the selected button parameter into boolean and then trying to retain the chosen radio button when a user submits and the form has an error.

if i understand you want to check your checkboxes if the value of $_POST['jsEnable'] is equal to the value of that checkbox, right?

<input type="radio" name="jsEnable" value="true" id="activatejs" 
 onchange="enable_link();" onclick="checkBoxEnabling()"  <?php if 
 (isset($_POST['jsEnable']) && $_POST['jsEnable']==="true") { echo "checked='checked'"; $_POST['jsEnable'] = true }?> />

 <input type="radio" name="jsEnable" value="false" 
 id="donotactivatejs" onchange="disable_link();" 
 onclick="checkBoxDisabling()" <?php if 
 (isset($_POST['jsEnable']) && $_POST['jsEnable']==="false") { echo "checked='checked'"; $_POST['jsEnable'] = false }?> />