Advertisement
-Annie-

Login-Form

Feb 2nd, 2017
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. namespace Login_Form
  2. {
  3.     using System;
  4.     using System.IO;
  5.  
  6.     static class Login_Form
  7.     {
  8.         static void Main()
  9.         {
  10.             Console.WriteLine("Content-Type: text/html\r\n");
  11.             string htmlContent = File.ReadAllText("../www/login-form.html");
  12.             Console.WriteLine(htmlContent);
  13.             string post = Console.ReadLine();
  14.             string[] postSplited = post.Split(new[] {'&', '='}, StringSplitOptions.RemoveEmptyEntries);
  15.             string username = postSplited[1];
  16.             string password = postSplited[3];
  17.             Console.WriteLine($"Hi {username}, your password is {password}");
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement