Yeah, but keep in mind that when you use GET to send data, the form values are sent through the URL string. So, that's not very secure...
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) | [reply] |
If you use "POST" to submit form data, then you have to read those from STDIN in your perl script like so:
Please don't. Use a library. There are several web frameworks, have a look around. If all else fails, just use the CGI module. Yes it's old, yes it's ugly, yes people say you should not use it, but it still works with very little efford, and for low-volume websites (intranet, home network), CGI is still good enough.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
| [reply] |