checkbox
Posted: Fri Jul 18, 2008 7:34 am
my codes like this:
$data=mysql_query("SELECT* FROM data");
while($a=mysql_fetch_array($data)){
$b=$a['name'];
echo '<input type="checkbox" name="check" value='.$b.">".$b."</br>";
}
output:
[] John
[] James
[] Nicholas
$d=$_POST['check'];
echo $d;
i use this code to display the names above but its only display only one name . what codes should i use to display all the names if i check all the names above?
$data=mysql_query("SELECT* FROM data");
while($a=mysql_fetch_array($data)){
$b=$a['name'];
echo '<input type="checkbox" name="check" value='.$b.">".$b."</br>";
}
output:
[] John
[] James
[] Nicholas
$d=$_POST['check'];
echo $d;
i use this code to display the names above but its only display only one name . what codes should i use to display all the names if i check all the names above?