How to remember a radio button selection in the multi form ..?

<input type="radio" name="yesrno" id="radio" value="yes"<?php if($_SESSION['rad_radio']) echo 'checked="checked"'; ?> />

<input type="radio" name="yesrno" id="radio" value="no" <?php if($_SESSION['rad_radio']) echo 'checked="checked"'; ?> />

It keeps on appear the selection "NO".

Any Help ?
Thanks

Got it working :

<input type="radio" name="yesrno" id="radio" value="yes"<?php if($_SESSION['rad_radio']=='yes') echo 'checked="checked"'; ?> />


 <input type="radio" name="yesrno" id="radio" value="no" <?php if($_SESSION['rad_radio']=='no') echo 'checked="checked"'; ?> />
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.