code error postback
<p>Could someone help me to check my code, no matter what value i clicked,the radio always checked on the last one. it doesn't postback correctly, however the return "echo" value is right. </p>

<p>Thanks a lot</p>

<p>here is my code </p>

<pre><code>&lt;html&gt;
  &lt;form id="form" name="form"  method="post" action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;"&gt;

&lt;input type="radio" name="foo" value="Apple" checked="checked" &lt;?php if(isset($_POST['foo']) == 'Apple'): echo "checked='checked'"; endif; ?&gt;/&gt;Apple
&lt;input type="radio" name="foo" value="Banana"  &lt;?php if(isset($_POST['foo']) == 'Banana'): echo "checked='checked'"; endif; ?&gt;/&gt;Banana
&lt;input type="radio" name="foo" value="Orange" &lt;?php if(isset($_POST['foo']) == 'Orange'): echo "checked='checked'"; endif; ?&gt;/&gt;Orange

&lt;input type="submit" value="Confirm" /&gt; &lt;/form&gt;

&lt;? if(isset($_POST['foo']))
{echo $_POST['foo'];
}
?&gt;

 &lt;/html&gt;
</code></pre>
