Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<body>
<form name="form1" method="get" action="[b][URL unfurl="true"]http://perltesting/cgi-bin/csv_email.cgi[/URL][/b]">
<input type="text" name="textfield">
<input type="hidden" name="hiddenField" value="hidden data here...">
<textarea name="textarea"></textarea>
<input type="checkbox" name="checkbox" value="checkboxValue321">
<input name="radiobutton" type="radio" value="radiobuttonValue12345">
<p>
<label>
<input name="RadioGroup1" type="radio" value="radioValOption1" checked>
a</label>
<br>
<label>
<input type="radio" name="RadioGroup1" value="radioValOption2">
b</label>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
<br>
</p>
</form>
</body>
</html>
#!/usr/bin/perl
print "Content-type: text/html\n\n";
$ENV{'QUERY_STRING'} =~ s/&Submit=Submit//;
$ENV{'QUERY_STRING'} =~ tr/+/ /;
$ENV{'QUERY_STRING'} =~ s/%(..)/pack("c", hex($1))/eg;
@pairs = split (/&/, $ENV{'QUERY_STRING'});
open (MAIL, '| /usr/sbin/sendmail -t');
print MAIL "To: [b]you\@yourisp.com[/b]\n";
print MAIL "From: [b]you\@yourisp.com[/b]\n";
print MAIL "Subject: CSV e-mail\n";
foreach $pair (@pairs) {
($field, $value) = split (/=/, $pair);
print "<li>$field => $value,";
print MAIL "$field => $value,";
}