By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,617 Members | 1,166 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,617 IT Pros & Developers. It's quick & easy.

Problem with Post of Multiple Select Data

P: n/a
I'm running php 4.4.7 on a Mac.

I'm trying to include a select control that allows multiple selections
in a form. I can show a form with pre-selected multiply selected
items, but when I try to post these only the item with the highest
index in the array of selections survives.

This is the partial result of print_r($HTTP_POST_VARS):

Array ( [hidden_ndx] =9 [hidden_itemID] =5.00000 [hidden_system]
=MPROP [searchstr] =[afdom] =Employment [afds] =Added [afiv]
=Adequate measure [submit] =Filter

On my screen [afdom] showed both Health and Employment as
selected, [afds] showed Derived and Added as selected.

What am I doing wrong?

thanks, --thelma

Mar 18 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
th****@uwm.edu wrote:
I'm running php 4.4.7 on a Mac.

I'm trying to include a select control that allows multiple selections
in a form. I can show a form with pre-selected multiply selected
items, but when I try to post these only the item with the highest
index in the array of selections survives.

This is the partial result of print_r($HTTP_POST_VARS):

Array ( [hidden_ndx] =9 [hidden_itemID] =5.00000 [hidden_system]
=MPROP [searchstr] =[afdom] =Employment [afds] =Added [afiv]
=Adequate measure [submit] =Filter

On my screen [afdom] showed both Health and Employment as
selected, [afds] showed Derived and Added as selected.

What am I doing wrong?

thanks, --thelma

Sorry, my crystal ball is in the shop, so I can't see your code. So I
have absolutely no idea what you're doing - much less what you're doing
wrong.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Mar 18 '08 #2

P: n/a
You need to capture as an array...

<select name="afdom[]" multiple size="4">

Why not use checklists, they are much easier (on the user) to select
then those nasty option lists.
Mar 18 '08 #3

P: n/a
la***@portcommodore.com wrote:
: You need to capture as an array...

: <select name="afdom[]" multiple size="4">

: Why not use checklists, they are much easier (on the user) to select
: then those nasty option lists.

Thank you, for both the correction and the suggestion. I've
done very little with HTML and I'm new to php [although the
php seems easier than the HTML].
--thelma
Mar 18 '08 #4

P: n/a
Greetings, la***@portcommodore.com.
In reply to Your message dated Tuesday, March 18, 2008, 08:19:48,
You need to capture as an array...
<select name="afdom[]" multiple size="4">
Why not use checklists, they are much easier (on the user) to select
then those nasty option lists.
20+ choices checklist looks insane and distracts user attention.
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Apr 10 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.