retrieving the label of an option element

From: Date: Wed, 29 Jun 2005 14:42:46 +0000
Subject: retrieving the label of an option element
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19819@lists.php.net to get a copy of this message
Hi Gang, I'm using QuickForm to build a form that emails the data and also saves it to a MySQL database using MDB. I can retrieve the value submitted from my select list of US states, but I cannot retrieve the label. An example option looks like: <option value="11">Hawaii</option> I can grab the submitted value with: $stateID = htmlspecialchars($form->exportValue('slctState')); Instead I want to grab 'Hawaii', the text label for the option. Thanks, cS

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