Originally posted by patmcv
<INPUT TYPE="radio" NAME="open" VALUE="Yes" <? echo $post=='Yes'?'Checked':''; ?>>Yes
Is this what you're after? [/B]
Maybe...
<? echo $post=='Yes'?'Checked':''; ?>
Is this like an if/else type of variable? it really may be as simple as that... I'll give it a try...
I have actually done an If/else statement that will take care of a simple yes/no like this...
MY big problem is more related to a radio or check box list with literally 80 options...
I could do ... this...
if ($category == "Shops") {$catcheck1 = "checked"; } else { $catcheck1="";}
if ($category == "Crafts") {$catcheck2 = "checked"; } else { $catcheck2="";}
and then this in the form...
<INPUT TYPE="radio" NAME="category" VALUE="Shops" <? print "$catcheck1"; ?> >Online Pagan Store
<INPUT TYPE="radio" NAME="category" VALUE="Crafts" <? print "$catcheck2"; ?> >Original Crafts
BUT then I would have to manually number all the other options
All I am really trying to find an easy way to do ...
bring in value A in an UPDATE statement and have the corresponding Radio button or check box tickled as active. .