in reply to Re: checkbox help
in thread checkbox help
sub getdata { # $_ is the form element name and $in{$_} is the cont +ents. if ($action eq $SENDSTR) { open(OUT,">>$xls_file") || print "could not open $xls_file" ; } foreach ($query->param) { $in{$_} = $query->param($_); if ($_=~/^c_/) { $check{$_}="CHECKED" } #checkbox if ($_=~/^r_/) { $check{$_.$in{$_}}="CHECKED" } #radio if ($_=~/^s_/) { $check{$_.$in{$_}}="SELECTED" } #Select if ($action eq $SENDSTR) { $in{$_}=~s/\r\n/ /g; if ($_ !~/action|lang/) { # don't print these fields to X +LS file print OUT "$in{$_}\t"; } } $in{$_}=~s/\r\n/<br>/g || $in{$_}=~s/<br>/\n/g; $in{$_}=~s/"/"/g; $in{$_}=~s/'/’/g; $in{$_}=~s/\$/&\#36;/g; } # end foreach if ($action eq $SENDSTR) { print OUT "$today\t"; print OUT "\n"; close(OUT); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: checkbox help
by ikegami (Patriarch) on Mar 05, 2007 at 18:30 UTC |