Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Select With option Multiple:true
13/05/2009
19:37
Avatar
Nathan
Member
Members
Forum Posts: 37
Member Since:
20/03/2009
sp_UserOfflineSmall Offline

Hi, I have a grid with an add button that loads the form editting form.

On the form is a select box with the multiple option set to true(the description field).  The idea is I would like a list of the values posted to the server when the form is submitted. 

Here's the problem(which probably has an easy solution that is glaring at me ...)

When the form is submitted the description values are all submitted but as(according to firephp):

DESCRIPTION    3
DESCRIPTION    5
DESCRIPTION    8
DESCRIPTION    6

On the server side :

$desc = $_POST['DESCRIPTION'];

yields only the value 6 ...

I've saw posts in regards to using explode but that would work if I was pulling a comma-delim string from the db to send to the table. Here I want to receive the values, assemble as a comma-delim string and then submit to the db.

Any suggestions ?

Nathan

15/05/2009
00:43
Avatar
akremedy
California, USA
Member
Members
Forum Posts: 37
Member Since:
16/12/2008
sp_UserOfflineSmall Offline

According to Tony's response to me in this post, the results should already be returned in the form of a comma separated string (hence the use of explode to convert to an array). 

To convert from an array to string, you'd use implode - but this doesn't really make sense as the data should be in the form of a string in the first place.

If you want to start by posting an array, see the hack that I made, then use implode to convert it to a string:  implode(",",$your_array);

http://www.trirand.com/blog/?p.....8;search=1

Adam

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
69 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information