uh... Are you using the CGI module?
This test CGI script can take 'hello " what?'
and when submitted will return the exact same thing.
What kinda problem are you really having?
#!perl
use strict;
use warnings;
use CGI qw(:standard);
print header();
if(param()){
print param('crap'), p();
} else {
print start_form();
print textfield(-name =>'crap',
-size => 30), p();
print submit(), p();
print end_form();
}
__END__
> -----Original Message-----
> From: drieux [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 12, 2002 9:04 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Preview data
>
>
>
> On Friday, April 12, 2002, at 04:30 , Kris G Findlay wrote:
>
> > i'm writing a script that takes data submited by a form and
> adds it to a
> > mysql database
> > but i would like to be able to preview the data as it is to
> be displayed
> > before final submission to database. i have tried using hidden form
> > fields within a prieview page
> > but have a problem of these fields breacking when a " is
> included within
> > the data
>
> I ran into that as well.... What I had to do was write around it
>
>
> #----------------------
> # a simple step forward to allow for "Andy R" expressions
> # a bit of overkill and all...
>
> sub dtk_retArray {
>
> my ($string) = @_;
> my @list;
>
> if ( $string =~ /".*"/ ) {
> my $tmp = $string;
> while ( $tmp ) {
> if ( $tmp =~ s/^"([\w\s]*)"\s*(.*)/$1 $2/) {
> $tmp = $2;
> push(@list, $1);
> } elsif ($tmp =~ s/(\w*)\s*(.*)/$1 $2/) {
> $tmp = $2;
> push(@list, $1);
> }
> }
>
> } else {
> @list = split(' ', $string);
> }
>
> @list;
>
> } # end of dtk_retArray
>
>
> I called that to check how a given textField had been set and
> whether or not it had " marks " - the twisted part was noticing
> that the way I had written the inner perl stuff meant that I
> could write 'perl syntax' pattern matching
>
> eg: search for "Andy R" or Andy\s*R ....
>
>
> ciao
> drieux
>
> ---
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]