Skip to content

Instantly share code, notes, and snippets.

@tizoc
Created February 23, 2014 16:01
Show Gist options
  • Save tizoc/9173225 to your computer and use it in GitHub Desktop.
Save tizoc/9173225 to your computer and use it in GitHub Desktop.
<!doctype html5>
<html>
<head><title>Form Submission Test</title></head>
<body>
<form method="POST" action="http://localhost:9999/submit">
<button name="button1" value="button1">BUTTON1</button>
<button name="button2" value="button2">BUTTON2</button>
<button name="submit" value="button1">BUTTON1</button>
<button name="submit" value="button2">BUTTON2</button>
</form>
</body>
</html>
#!/usr/bin/perl
use CGI qw/:standard -debug/;
my $value = param("submit");
print "HTTP/1.1 200 OK\n";
print "Content-type: text/plain\n\n";
print "Button with value '$value' was pressed\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment