Ninjakreborn Posted March 7, 2007 Share Posted March 7, 2007 There is no way to really quickly explain this. So here is the code. <?php while ($row = mysql_fetch_array($query)) { echo $row['username']; $selectpermissions = "SELECT * FROM permissions WHERE projectid = '$projectid' AND clientid = '{$row[id]}';"; $querypermissions = mysql_query($selectpermissions); if ($rowpermissions = mysql_fetch_array($querypermissions)) { echo "<input name=\"level[]\" type=\"checkbox\" value=\"{$row[id]}.Enabled\" checked=\"checked\" />"; }else { echo "<input name=\"level[]\" type=\"checkbox\" value=\"{$row[id]}.Disabled\" />"; } ?> Basically pulling this information from teh database, it's either already enabled or disabled. That's fine. They alter this data on this page (however they end up altering it). In the end they sent it to another page, it resets the per missions. I need a way to tell which one's are enabled, and which ones are disabled. I tried to just set this array, but I have no way to tell which are enabled,a nd which are enabled. because they are coming fresh, I have no way to tell. I can't name one enabled and one disabled, because I have no way of knowing ahead of time which is which. Any advice? Link to comment https://forums.phpfreaks.com/topic/41683-solved-logical-issue-passing-data-via-checkboxes/ Share on other sites More sharing options...
Ninjakreborn Posted March 7, 2007 Author Share Posted March 7, 2007 Anybody want to throw out some input here? Link to comment https://forums.phpfreaks.com/topic/41683-solved-logical-issue-passing-data-via-checkboxes/#findComment-202034 Share on other sites More sharing options...
Ninjakreborn Posted March 7, 2007 Author Share Posted March 7, 2007 never mind just got an idea. Link to comment https://forums.phpfreaks.com/topic/41683-solved-logical-issue-passing-data-via-checkboxes/#findComment-202041 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.