Connecting Tech Pros Worldwide Help | Site Map

Problem with Post of Multiple Select Data

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 18th, 2008, 01:45 AM
thelma@uwm.edu
Guest
 
Posts: n/a
Default Problem with Post of Multiple Select Data

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


  #2  
Old March 18th, 2008, 01:45 AM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: Problem with Post of Multiple Select Data

thelma@uwm.edu wrote:
Quote:
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.
jstucklex@attglobal.net
==================

  #3  
Old March 18th, 2008, 04:25 AM
larry@portcommodore.com
Guest
 
Posts: n/a
Default Re: Problem with Post of Multiple Select Data

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.
  #4  
Old March 18th, 2008, 04:45 AM
thelma@uwm.edu
Guest
 
Posts: n/a
Default Re: Problem with Post of Multiple Select Data

larry@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
  #5  
Old April 10th, 2008, 11:55 AM
AnrDaemon
Guest
 
Posts: n/a
Default Re: Problem with Post of Multiple Select Data

Greetings, larry@portcommodore.com.
In reply to Your message dated Tuesday, March 18, 2008, 08:19:48,
Quote:
You need to capture as an array...
Quote:
<select name="afdom[]" multiple size="4">
Quote:
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 <anrdaemon@freemail.ru>

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.