Serialize checkbox array, also get checkboxes with off-value
Posted
by guzh
on Stack Overflow
See other posts from Stack Overflow
or by guzh
Published on 2010-04-14T16:42:28Z
Indexed on
2010/04/14
16:53 UTC
Read the original article
Hit count: 254
Hi,
I was wondering if this is possible. The serialize-string will be inserted in a mySQL-database, so it would be fine if all checkboxes would be inserted and not only the ones that is ticked(on).
it's possible to make on column in the database for each of the checkboxes, and use this if/else-statement:
if(isset($_GET['checkbox'])) {
// It's checked!
}
else {
// not checked!
}
but its a bit unappropriate...
© Stack Overflow or respective owner