Anon
07-10-2001, 02:55 AM
Hello, let's see if someone can help me.
A have created an HTML form like this:
<FORM NAME="formulario" ACTION="prueba.php" METHOD="POST">
1<INPUT TYPE="checkbox" NAME="valor" VALUE="1"><BR>
2<INPUT TYPE="checkbox" NAME="valor" VALUE="2"><BR>
<INPUT TYPE="submit" VALUE="Enviar">
</FORM>
How could I get (with PHP) the values "1" and "2" of $valor in the case both values are checked in the form? The problem is that if I did (in the INPUTs) NAME="valor[]" I could catch them as $valor[0] and $valor[1], but then I use and document.formulario.valor doesn´t recognize it as an object (it gives me a runtime error). Thank you very much.
A have created an HTML form like this:
<FORM NAME="formulario" ACTION="prueba.php" METHOD="POST">
1<INPUT TYPE="checkbox" NAME="valor" VALUE="1"><BR>
2<INPUT TYPE="checkbox" NAME="valor" VALUE="2"><BR>
<INPUT TYPE="submit" VALUE="Enviar">
</FORM>
How could I get (with PHP) the values "1" and "2" of $valor in the case both values are checked in the form? The problem is that if I did (in the INPUTs) NAME="valor[]" I could catch them as $valor[0] and $valor[1], but then I use and document.formulario.valor doesn´t recognize it as an object (it gives me a runtime error). Thank you very much.