Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace DecisionMaking
- {
- using System;
- public class DecisionMaking
- {
- static void Main()
- {
- Console.WriteLine("Content-Type: text/html\r\n");
- Console.WriteLine("<!DOCTYPE html>\r\n<html>\r\n<head>\r\n\t<title>Example</title>\r\n</head>\r\n<body>\r\n\t<form action=\"DecisionMaking.exe\" method=\"POST\">\r\n\t\t<input type=\"text\" name=\"nickname\">\r\n\t\t<br/>\r\n\t\t<input type=\"submit\">\r\n\t</form>\r\n</body>\r\n</html>");
- string method = Environment.GetEnvironmentVariable("REQUEST_METHOD");
- Console.WriteLine(method);
- method = method.ToLower();
- if (method == "get")
- {
- Console.WriteLine("get");
- }
- else if (method == "post")
- {
- Console.WriteLine("post");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment