Re: Checkboxes to gather rows to delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



print "<input type=checkbox name=\"rowid[".$row['rowid']."]\"
value=\"".$row['rowid']."\">";

You must put all of those checkbox values into an array and then use the
foreach loop, to process the selected checkbox items)...

print_r($rowid); would print out the contents of the generated array

should be something like:

Array(
4=>4,
6=>6,
1024=>1024
);

with this you could generate a where clause with:

where rowid in (4,6,1024)

and you're done!

:-)
kind regards
Christoph

> I have a mysql database with a table using one column as a primary key.
> (rowID). On a php page I use a query to  list all of the rows of the table
> and have a checkbox beside each  row that should be used to check if you
> would like to delete this row. Can someone give me an example using post
> to pull the boxes that need to be deleted.
> Thanks!
> Lewis
>
>
>


-- 
CC

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux