How I can insert multiple selected checkboxes to a database in Java of course. I added the "," but its not working only the first selected checkbox got stored.
How can I solve this?
Here is my current code:
String haspaper = null;
if(yes3.isSelected() == true){
if(checkcontract.isSelected()==true){haspaper=checkcontract.getText()+",";}
else if(checkcivile.isSelected()==true){haspaper=checkcivile.getText()+" , ";}
else if(checkcontartpar.isSelected()==true){haspaper=checkcontartpar.getText()+" ,";}
else {haspaper=mahiyapaper.getText()+" ,";}
}else{haspaper=no3.getText();}