Re: form question
| From: | Jurian | Date: | Wed, 19 Jul 2000 14:12:47 +0000 |
| Subject: | Re: form question | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7268@lists.php.net to get a copy of this message | ||
There is nothing in it, cause you didn't put any values in it. You *MUST* define a value for every checkbox, then on the next page, the array will have those values in it. Of course you get an array with empty values, how can php know what to put in a field if you don't give it a value? Right, it can't.
Give every checkbox a unique value, then try again, and you'll see that it works.
At 10:45 19-7-2000 -0300, Martin A. Marques wrote:
Nothing changed with the value attribute. Also the value attribute is not that necesary, because if I uncheck the checkbox, it's not loaded. What I found out is that the variable ar_pru is defined but empty if one or more checkboxes are checked, but is not defined if all checkboxes are unchecked. So, if the variable is set, and something is passed to the next script by the form, why is it empty? Or does it have something I cant see? On Wed, 19 Jul 2000, you wrote: None of your checkboxes have a value attribute. "Martin A. Marques" wrote:Actually my "test" form looks like this: <form action="prueba-resultado.php" method="post"> <input type="checkbox" checked name=ar_pru[]><BR> <input type="checkbox" checked name=ar_pru[]><BR> <input type="checkbox" checked name=ar_pru[]><BR> <input type="submit" value="Go!"> </form>-- "And I'm happy, because you make me feel good, about me." - Melvin Udall -----------------------------------------------------------------Martín Marqués email: martin@math.unl.edu.ar Santa Fe - Argentina http://math.unl.edu.ar/~martin/Administrador de sistemas en math.unl.edu.ar ----------------------------------------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net