473,382 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

Mar 18 '08 #1
4 1689
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Rolf Wester | last post by:
Hi, I have a form with a select element with multiple="true". When using the GET method (I suppose the same happens with the POST method) I can seen that the form sends channels=CH1&channels=CH2...
9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
2
by: Kingdom | last post by:
I have a SelectBoxes.asp page that is working with multiple selection dropdown boxes to extract data and total the selection prices. Tom & Bob were kind enough to give me a big help getting this...
6
by: Stephen Cook | last post by:
Having worked through the problems around enabling the document function using an XmlUrlResolver I started work on building a useful class to hide the intricacies. Trying to generalise the process...
4
by: John Tyce | last post by:
The problem that I am now having, involves refreshing controls. I have allot of text boxes, several combo boxes and grids. These controls are showing live data from an Oracle database. I have dates...
10
by: Saso Zagoranski | last post by:
hi, this is not actually a C# problem but since this is the only newsgroup I follow I decided to post my question here (please tell me where to post this next time if you think this post...
3
by: imrantbd | last post by:
This is my first problem.Please help me. I have the following code: <head> <script language="JavaScript"> function addSrcToDestList() { destList1 = window.document.forms.destList; srcList...
3
by: imrantbd | last post by:
I need array type name like "destList" must use for my destlist select box,not a single name.Or need a solution to capture multiple value of "destList" select box and send all selected value in php...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
58
by: bonneylake | last post by:
Hey Everyone, Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.