updating with hidden fields
Hey Jason
Am using security assist to show specific content in an update page if the visitor has the necessary auth credentials. If they dont, the 'Live' and 'PageName' are invisible so have added hidden fields to make sure the database isnt updated with empty fields but it isnt working and not sure what I have done wrong. Basically, if youre logged in as Super Admin and you update either the 'Live' or 'PageName' fields the update does not take effect and just remains what it was. If youre logged in as Admin it does what it should (ie hide the Live and PageName inputs and not update the db on update)
<?php if(WA_Auth_RulePasses("Super Administrator")){ ?>
<div class="lineGroup">
<div class="errorGroup"> <span>
<label class="sublabel" for="Live">Live?
<input type="checkbox" name="Live" id="Live" value="1" class="formCheckboxField_Standard" <?php if (!(strcmp($row_WADApage_contents['Live'],1))) {echo "checked=\"checked\"";} ?> tabindex="1">
</label>
<span style="font-size:12px;">(if checkbox is 'ticked', the page is live)</span></span> </div>
</div>
<div class="lineGroup">
<label for="PageName" class="sublabel" > Page:</label>
<div class="errorGroup"> <span>
<input id="PageName" name="PageName" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("pagecontentsupdate","PageName"):"".$row_WADApage_contents["PageName"]."")); ?>" class="formTextfield_Medium" tabindex="2" style="width:650px; height:35px; font-size:16px;">
</span> </div>
</div>
<?php } // End Show Region ?>
<input name="Live" type="hidden" value="<?php echo $row_WADApage_contents['Live']; ?>" />
<input name="PageName" type="hidden" value="<?php echo $row_WADApage_contents['PageName']; ?>" />