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

From: Date: Sat, 06 Aug 2005 17:14:45 +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-20304@lists.php.net to get a copy of this message
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/

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