daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Mar 17th, 2018 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?
  2. session_start();
  3. if (session_is_registered("username") AND ("password")) {
  4. include("loggedin.php");
  5. }else{
  6. ?>
  7.  
  8. <html>
  9.  
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  12. <title>Login</title>
  13. <link rel="stylesheet" href="../mm_spa.css" type="text/css" />
  14. </head>
  15.  
  16. <body bgcolor="#000000" text="#FFFFFF">
  17.  
  18. <?
  19. if($_GET[login] == "yes") {
  20.  
  21. if($_POST[username] == "") {
  22. echo("<link rel=stylesheet href=../mm_spa.css type=text/css>You have to
  23.  
  24. write a username!<br><br>");
  25.  
  26. } else {
  27.  
  28. if($_POST[password] == "") {
  29. echo("<link rel=stylesheet href=../mm_spa.css type=text/css>You need to
  30.  
  31. write a password!<br><br>");
  32.  
  33. } else {
  34.  
  35. include("../inc/cfg.php");
  36.  
  37. $tjek_bruger = mysql_query("SELECT * FROM users WHERE username LIKE
  38.  
  39. '$_POST[username]' AND password = '$_POST[password]'") or die(mysql_error
  40.  
  41. ());
  42. $tjek = mysql_fetch_array($check_user);
  43. if($tjek[username] == "") {
  44. echo("ERROR!");
  45.  
  46. } else {
  47.  
  48. $_SESSION[username] = $_POST[Username];
  49. $_SESSION[password] = $_POST[Password];
  50.  
  51. print "Hold on while the system is logging you in..<br><br>";
  52. print "<meta http-equiv=\"refresh\" content=\"0; url=loggedin.php\">";
  53.  
  54. }
  55. }
  56. }
  57. }
  58. ?>
  59.  
  60. <form action="login.php?login=yes" method="POST">
  61. <b>Username:</b><br>
  62. <input type="text" name="brugernavn" size="14"><br>
  63. <b>Password:</b><br>
  64. <input type="password" name="Password" size="14"><br>
  65. <input type="submit" name="submit" value="Login">
  66.  
  67. </form>
  68.  
  69. </body>
  70.  
  71. </html>
  72.  
  73. <?
  74. }
  75. ?>
  76.  
  77. </body>
  78. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top