Puh thats tought! So i have to go the hard way for it? What a pity!
Lets see if i understand the code... Is there any source where I can read about 
passing parameters to a perl script via the browser?

> One solution, when not using $value = param('value');
> 
> sub parse_form {
> 
>   read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
> 
        [Theuerkorn Johannes]  so i have to give the length of the variable name and 
value? And what if i donīt know it before?
>     if (length($buffer) < 5) {
>           $head = $ENV{QUERY_STRING};
>      }
        [Theuerkorn Johannes]  No, i donīt understand the reading part at all ... :-(

>    @pairs = split(/\?/, $head); # split vars using ? as delimitor
>     foreach $pair(@pairs) {
>        ($name, $value) = split(/=/, $pair); # split var and value using = as delim.
> 
        [Theuerkorn Johannes]  Ok, so i got the name and values somehow into the pairs 
array and now i put it into two variables $name and $value for further use, right? But 
again i donīt know how the values got into $head...

>        $value =~ tr/+/ /;
>        $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> 
> 
        [Theuerkorn Johannes]  Ok, have to learn a lot as it seems, i definetely have 
no clue what happens here,... OK, lets try: in the first line you change every + to a 
blank, donīt you? And as far as I know from RegExp, in the second line you change 
EVERYTHING to something. But to what?
>     
>    ${$name} = $value;
>     
        [Theuerkorn Johannes]  Hey thats cool, i definetely understand that! ;-)
> }
>  } # End sub parse_form
>  
>  
>  
>  Regs David
>  ---------------------
>  > From [EMAIL PROTECTED] Tue Jun 25 
>15:32:57 MET 2002
> > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> > Precedence: bulk
> > List-Post: <mailto:[EMAIL PROTECTED]>
> > List-Help: <mailto:[EMAIL PROTECTED]>
> > List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
> > List-Subscribe: <mailto:[EMAIL PROTECTED]>
> > Delivered-To: mailing list [EMAIL PROTECTED]
> > Message-ID: <AEEEEE93AFA5D411AF8500D0B75E4A16058EE1B5@BSL203E>
> > To: "'MECKLIN, JOE (ASI)'" <[EMAIL PROTECTED]>
> > Cc: [EMAIL PROTECTED]
> > Subject: AW: param problem
> > Date: Tue, 25 Jun 2002 15:10:05 +0200
> > MIME-Version: 1.0
> > X-Mailer: Internet Mail Service (5.5.2653.19)
> > Content-Type: text/plain;
>       charset="ISO-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> > Content-Length: 1671
> > Status: RO
> > 
> > Thanks, but this doesnīt work either, the problem with the &#43 is that the 
>cgi:param method takes everything after the & sign as the next variable. As the 
>syntax for the param method is: 
>http://server/script.pl?variable1=value&variable2=value...etc
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von:      MECKLIN, JOE (ASI) [SMTP:[EMAIL PROTECTED]]
> > > Gesendet am:      Dienstag, 25. Juni 2002 15:05
> > > An:       'Theuerkorn Johannes'
> > > Betreff:  RE: param problem
> > > 
> > > In place of the plus sign (+), try sending the html encoding &#43
> > > The html on the receiving end should translate that to a plus sign.
> > > 
> > > 
> > > 
> > > -----Original Message-----
> > > From: Theuerkorn Johannes [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 25, 2002 7:59 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: cgi:param problem
> > > 
> > > 
> > > Hi there, 
> > > 
> > > iīve got to pass a serial number to a perl.cgi. Doing it via the cgi:param
> > > funktion seems not to work.
> > > 
> > > 
> > > >use strict;
> > > >use CGI;
> > > >use DBI;
> > > >my $cgi_obj = new CGI;
> > > >my $seriennummer = $cgi_obj->param("seriennummer");
> > > 
> > > Passing http://server/script4.pl?seriennummer=CN+/P4226666
> > > 
> > > results in a variable seriennummer=CN/P4226666
> > > 
> > > As i want to use the variable seriennummer for an SQL Query later, this> 
> > > doesnīt work.
> > > 
> > > Any possibility passing the + to my cgi Script? (\+ doesnīt work, either '+'
> > > or "+")
> > > 
> > > Johannes
> > > 
> > > -- 
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to