Radio Buttons update code
Just using some radio buttons which I don't often, and can't seem to get the syntax quite right on my update page, where the currently selection should show as checked.
What I have at the moment is:
<label class="radioSublabel_Narrow" for="Publication_Type__1">
Public <input type="radio" name="Publication_Type" id="Publication_Type__1" value="<?php if (!(strcmp($row_WADApublications['Publication_Type'],"Public"))) {echo "checked=\"checked\"";} ?>" class="formRadioField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("publicationsupdate","Publication_Type"):"".$row_WADApublications["Publication_Type"].""),"1"))) {echo "checked=\"checked\"";} ?> tabindex="1"></label>
<label class="radioSublabel_Narrow" for="Publication_Type__2">
Private <input type="radio" name="Publication_Type" id="Publication_Type__2" value="<?php if (!(strcmp($row_WADApublications['Publication_Type'],"Private"))) {echo "checked=\"checked\"";} ?>" class="formRadioField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("publicationsupdate","Publication_Type"):"".$row_WADApublications["Publication_Type"].""),"0"))) {echo "checked=\"checked\"";} ?> tabindex="2"></label>
With that, neither box shows as checked, but it if the value of 'Publication_Type' is 'Public' the first one should be checked, and if the value is 'Private' the second one should be checked. So I assume I just haven't got the syntax for the value right?
EDIT: OK, think I've got it - changes in bold below:
<label class="radioSublabel_Narrow" for="Publication_Type__1">
Public <input type="radio" name="Publication_Type" id="Publication_Type__1" value="<?php if (!(strcmp($row_WADApublications['Publication_Type'],"Public"))) {echo "checked=\"checked\"";} ?>" class="formRadioField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("publicationsupdate","Publication_Type"):"".$row_WADApublications["Publication_Type"].""),"Public"))) {echo "checked=\"checked\"";} ?> tabindex="1"></label>
<label class="radioSublabel_Narrow" for="Publication_Type__2">
Private <input type="radio" name="Publication_Type" id="Publication_Type__2" value="<?php if (!(strcmp($row_WADApublications['Publication_Type'],"Private"))) {echo "checked=\"checked\"";} ?>" class="formRadioField_Standard" <?php if (!(strcmp((isset($_GET["invalid"])?ValidatedField("publicationsupdate","Publication_Type"):"".$row_WADApublications["Publication_Type"].""),"Private"))) {echo "checked=\"checked\"";} ?> tabindex="2"></label>
Although its not updating with the new value if I change it...