drawing from the database, these variables can only equal "Y" or "N", but when i run this,
it apparently always comes up equal to Y, because all the boxes are checked...
help?
<?php
if ( $a_row['accesscal'] = "Y" ) {
$calchecked = "checked=\"checked\"";
} else {
$calchecked = " ";
}
if ( $a_row['accessnote'] = "Y" ) {
$notechecked = "checked=\"checked\"";
} else {
$notechecked = " ";
}
if ( $a_row['accessrec'] = "Y" ) {
$recchecked = "checked=\"checked\"";
} else {
$recchecked = " ";
}
?>
<td><input type="checkbox" <?php print $calchecked ?> name="accesscal" value="accesscal">Calendar / Event Log </td>
<td><input type="checkbox" <?php print $notechecked ?> name="accessnote" value="accessnote">Client Logs / Notes </td>
<td><input type="checkbox" <?php print $recchecked ?> name="accessrec" value="accessrec">Reclamation</td>
I have a bunch of other variables from the same pull that turn up just fine, so I'm a little confused...