I have table of category like this
Table Name : personality
id | Category
1 | cute
2 | rich
3 | stupid
4 | funny
5 | famous
All i want to do is make to check box option with php for this personality table and update other table with multiple category
and my form:
<form>
Name : <input name="user" type="text" id="user" value="<?php echo $line['user'];?>" />
Personality : <?php $personality=mysql_query("select * from personality");
while($data=mysql_fetch_array($personality)){
$check = ($line['usr_char']==$data['category'])?"checked" : "";
<label for='$data[kategori]'>
<input type='checkbox' id='usr_char' checked value='$data[category]'>
<span class='custom checkbox $check'></span> $data[category]</label><br>}?>
How do I post the category of personality table into other table with multiple category?
Here is example for the result : Table Name : people
name | usr_char
abby | cute,rich,funny
andy | famous,funny