MiniVend Akopia Services

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

Re: Changing multiple value delimeter



******    message to minivend-users from mikeh@minivend.com     ******

Quoting allan@instantsoft.com (allan@instantsoft.com):
> ******    message to minivend-users from allan@instantsoft.com     ******
> 
> 
> sub parse_post {
>         my(@pairs, $pair, $key, $value);
>         undef %CGI::values;
>         return unless defined $CGI::post_input;
>         @pairs = split(/&/, $CGI::post_input);
>         foreach $pair (@pairs) {
>                 ($key, $value) = ($pair =~ m/([^=]+)=(.*)/)
>                         or die "Syntax error in post input:\n$pair\n";
>                 $key = unhexify($key);
>                 $value =~ s/\+/ /g;
>                 $value = unhexify($value);
>                 # Handle multiple keys
>                 unless (defined $CGI::values{$key}) {
>                         $CGI::values{$key} = $value;
>                 }
>                 else {
> 
> 
> #############################
> ## QUESTION HERE
> ## QUESTION HERE
> #############################
> ## If I change "\0" below to something else like
> ## say '|'   , will minivend break?

It will crash so hard the pieces would be impossible to pick up.

> If yes, does anyone
> ## know how to get all the values from a select multiple
> ## using [value varname]? The way it is right now, if you
> ## do something like:
> ## <select name=vname multiple size=4>
> ##	<option value=1>1
> ##	<option value=2>2
> ##	<option value=3>3
> ## </select>
> ## [value vname] returns only one value.
> ##

Split on nulls, or use MV3.12's new value-extended tag.
-
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: