Forum Moderators: coopster
@print("<option value=\"$row[0]\">$row[0]</option>");
}
}
elseif($result('bag')>=4)
disable bag
else {
print("<option value=\"\">No courses created yet</option>");
}
?>
What i want to achieve here is that after a users select an item for the dropdown box and submit for 4 times that particular item with b disabled to all other users
A bit of a rush today and don't have time to add precise code, but I would output something based on a "check" of the database data. You could do a count(*) or something like
select count(*) from table (or whatever . . .check it first)
if ($count >= 4) { echo "Not available"; }
else {
// your code to output the select
}
?>