Show If question
I recently did this with an asp site which I'm redoing now as php since everyone tells me php is better. It worked in asp but I can't get it to work now.
I am trying to show the password field on a details page only if it is your record. My rule (If Self) says to show the field if the Session ID = the detail recordset ID. I've put dynamic fields in to verify that they both are the same, but my field still won't show.
My code is:
<?php if(WA_Auth_RulePasses("If Self")){ // Begin Show Region ?>
<tr>
<th>Password:</th>
<td><input type="text" class="WAATKTextField" name="txtpassword" id="txtpassword" value="<?php echo(str_replace('"', '"', $row_rs_directory_detail['txtpassword'])); ?>" size="50"/></td>
</tr>
<?php } // End Show Region ?>
Any help would be appreciated. Thank you.
Update:
I've been working on this and have a more complete picture of what I'm trying to do. Basically there is a detail page of info that if it is the info of person signed in, they will see one version which they can update, except for the Group field which only the Admin can see and edit. The Admin can also see and update all their other data.
If it's not your data, you see a non-editable version which excludes password and group data.
What's happening is that no matter if who you're signed in as, you're seeing the non-editable version of the data.
I realize that's a bit complicated so I've attached a zip of the detail page and HelperGroupsRulesPHP.php so you can see how my rules are.
Thanks for any help. I'm stuck!