hellow i have this code to send checkbox data to mysql database.the table called color has two column uid and color.
i need to enter userid(uid) together with its color selected from the checkbox values(checked only),then at the point of displaying i need to give me each uid with its checked values selected.
this code send values to the table but with N; into color column.
the code for retriving data i didnt manage to code it
please help me with this code and the one for retriving data from the tab[/I][/I]le!!.
<?php
if($POST['Addother']=="OK"){
$uid=($POST['uid']);
$color=serialize($_POST['color']);
$sql="INSERT INTO color(uid,color)VALUES('$uid','$color')";
$result=mysql_query($sql) or die ('error,query failed');
echo "informations succefully added";
}
?>
<body>
<form name="Addother" method="post" action="">
<p>id
<input type="text" name="uid">
</p>
<p>colors</p>
<p>
<input type="checkbox" id="color[]" value="red">
red
<input type="checkbox" id="color[]" value="green">
green
<input type="checkbox" id="color[]" value="brown">
brown
<input type="checkbox" id="color[]" value="blue">
blue
</p>
<p>
<input type="submit" name="Addother" value="OK">
</p>
</form>
</body>
thanks in advance!.