Forum Moderators: coopster
I have an input checkbox for banning members. A page displays the members i want to ban:
<input type=checkbox name="user_ids[]" value="">
(The value would be any int number)
On the page that accepts the data, all I want to do is create a new row for each input box checked. I'm guessing I would have to put it in an array of somesort? Plz help this simple question. THx
Are you saying that you want to create a new row in a database table for each box checked? Have you checked out this thread yet? It is specifically using checkboxes:
Using a form to retrieve data from a MySQL database [webmasterworld.com]?
$sql= "select * from table";
$result= mysql_query($sql);
while($row= mysql_fetch_array($result))
{
}
SOmthing like that, but with the data coming from the checkboxes, not from a database.
EDIT: NVM, i found it myself :)
foreach ($_POST['user_ids'] as $i)
{
}