Jump to content

[SOLVED] Logical Issue (passing data via checkboxes)


Ninjakreborn

Recommended Posts

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.