> I have a <select multiple></select> object named list that is
> selected contents to an array. That part works fine. I can use a for
> grab all of the selected items. Where I'm stuck is that I want to get
> the value AND the text for any given <option> element and simply
> the items in the array 1-N based on the number of rows is not
> <select name="itemList" multiple>
> <option value="101">PHP For Dummies</option>
> <option value="102">PHP For Professionals</option>
> <option value="103">PHP For Gurus</option>
> I want to be able to be able to get both the value property (101, 102,
> AND the text between the <option></option> tags. Currently, I'm only
> the text between the <option></option> tags. Is there a PHP function
> allows me to get to both?
No, you only get the value="" part. I think your confused, or this isn't
the correct code, when you say your are getting what's between
<option></option> then you're doing something different.
Bottom line, you only get the value part. If you want two values passed,
then use some hidden elements to relate the values.
<input type="hidden" name="itemListtext" value="PHP For Dummies">
would relate to your first element. So in PHP, you'd have
$_POST['itemList'] == 101
$_POST['itemListtext'][$_GET['itemList']] == "PHP For Dummies"
If you're using your database correctly, all you should need is the
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php