checkbox

wxdqz

New Member
I have a multiple checkbox to select. How can I insert multiple choice in to database in
the same column and same row.

//code
<input name="check[]" Type="checkbox" values="a">
<br>
<input name="check[]" Type="checkbox" values="b">
<br>
<input name="check[]" Type="checkbox" values="c">
<br><input type=submit>
.
.
.
<?PHP
$dsn="dsn";
$uid="uid";
$pwd="ped";
$fdn=odbc_connect($dsn,$uid,$pwd);
$sql4="INSERT INTO table (a) VALUES ('$admin[0],$admin[1],$admin[2]')";
$result4=odbc_exec($fdn,$sql4);
?>
This code is work incase the user tick all checkbox but user didnot check all box .It can not fine the have error undefine index .
How can I do?
Thank you
 
Back
Top