Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Using checkboxes to write multiple values to one field



******    message to minivend-users from cfm@maine.com     ******

On Tue, Apr 04, 2000 at 10:56:49AM +0200, jojo@buchonline.net wrote:
> ******    message to minivend-users from jojo@buchonline.net     ******
> > 
> > <input type=checkbox name=myfield value="A B"> Option A B
> > <input type=checkbox name=myfield value="C "> Option C
> > <input type=checkbox name=myfield value="D "> Option D
> > 
> > Minivend saves and retrieves "A B" repeatedly without problems.  I can also 
> > change the form element to a text field and type in as many space-separated 
> > items as I want, and they are saved and retrieved without trouble.  Maybe I 
> > am misunderstanding this, but I don't think the spaces are the source of my 
> > trouble.
> 
> iīm not sure about this thread. But it seems to me, passing any values
> via the post methode with your codes like above should cause some
> trouble. It seems to me, you canīt use the _same_ variable name to pass
> more than one value. What did you get, if you use the different
> variable names like "myfield1", "myfield2" and so on?

Search the minivend docs for "stacked"; I think you will find it.  
The above works just fine.  The issue is how you decode it.

You need to split $CGI{myfield} on null, eg:
               @myfield=split /\000/,$CGI{myfield};

Sorry, I don't know how to do that in vanilla minivend [tags].  We always
use perl nowadays.

If you open up your session file with an editor like emacs you will see
other examples of that syntax.



-- 

Christopher F. Miller, Publisher                             cfm@maine.com
MaineStreet Communications, Inc         208 Portland Road, Gray, ME  04039
1.207.657.5078                                       http://www.maine.com/
Database publishing, e-commerce, office/internet integration, Debian linux.
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: