I did try your earlier suggestion of issest, but I am missing something or may be not doing it right.
I am trying to dynamiclly set the value of Radio button.
When the page is loaded, the value of $part_assy (which is button1) should be checked with each of the radio buttons.
If $part_assy is equal to the Value of radio button then radio button should be checked.
$part_assy = "button1";
<form name="form2" method="post" action="<?php echo $_SERVER['PHP_SELF']?>">
<input name="radiobutton" type="radio" value="button1">Text1<br>
<input name="radiobutton" type="radio" value="button2">Text2<br>
Any help is appriciated. Thanks.