Re: QuickForm: error when processing unselected radio buttons - "Notice: Undefined index: radio1 in C:\.."

From: Date: Sat, 06 Aug 2005 17:40:06 +0000
Subject: Re: QuickForm: error when processing unselected radio buttons - "Notice: Undefined index: radio1 in C:\.."
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20306@lists.php.net to get a copy of this message
Thanks. There are about 40 yes/no fields on this page so building that SQL statement would be enormous and I'd rather not have to default them all when created. But it sounds like those are my choices.... I guess I don't understand why a text field can pass through fine while a radio button can't. IUs it that the radio is an array and without anything being set it's not a valid array? --- Maximillian Schwanekamp <lists@neptunewebworks.com> wrote: > l Burnerheimerton wrote: > > If the user does not select YES or NO to a radio > > button, it processes the data and INSERTS or > UPDATES > > but throws the following error: > > > > "Notice: Undefined index: pre1 in ..." > > > How can I fix this? > > Since you're running under E_ALL error reporting, > you probably should > just check for a value using isset() before calling > the index of the > form array in building your SQL. Alternatively, set > a validation rule > to ensure that all radios groups have a value before > processing. > > -- > Max Schwanekamp > http://www.neptunewebworks.com/ > > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs

« previous php.pear.general (#20306) next »