PDA

View Full Version : check boxes


learning110
04-24-2005, 02:01 PM
I'v looked at several examples but cant seem to get the check boxes to transfer their values.

in my html i have

<INPUT type = "CHECKBOX" CHECKED = "checked" value = "1" name="test[]">
<INPUT type = "CHECKBOX" CHECKED = "checked" value = "2" name="test[]">
<INPUT type = "CHECKBOX" CHECKED = "checked" value = "3" name="test[]">

in my php i have

$retrieveno=$_post['test'];
echo "<b> $retrieveno </b>";

shouldnt this return the value 123 ? as im getting nothing. Everything on the form is ok because its trsansfering values from input boxes.

Thanks in advance.

marek_mar
04-24-2005, 02:28 PM
try print_r($_POST['test']);
Do you have a form tag like <form action="yourphpscript.php" method="post">??

Velox Letum
04-24-2005, 02:44 PM
name="test[]"> Why do you have an array bracket [] ?

learning110
04-24-2005, 03:31 PM
Thanks for your replys

yes <form action="updatedbase.php" method="post">
i tried [] as i saw it on a example but made no diffrence, dont work either way. The print_r($_post['test']); didnt display anything.