in reply to Re^2: submit button fails to pass the values using perl cgi?
in thread submit button fails to pass the values using perl cgi?
If you use "POST" to submit form data, then you have to read those from STDIN in your perl script like so:
# Usage: STRING = GetFormData()
# Returns the form content as one giant string.
sub GetFormData
{
my @L;
while (<STDIN>)
{ push @L, $_; }
@L or return '';
return join('\n', @L);
}
...
my $FORM_DATA = GetFormData();
(My Disclaimer: I'm a beginner perl programmer myself, so... what I say may not be 100% correct. LOL)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: submit button fails to pass the values using perl cgi?
by afoken (Chancellor) on Feb 01, 2019 at 21:39 UTC |