Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- session_start();
- if (session_is_registered("username") AND ("password")) {
- include("loggedin.php");
- }else{
- ?>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <title>Login</title>
- <link rel="stylesheet" href="../mm_spa.css" type="text/css" />
- </head>
- <body bgcolor="#000000" text="#FFFFFF">
- <?
- if($_GET[login] == "yes") {
- if($_POST[username] == "") {
- echo("<link rel=stylesheet href=../mm_spa.css type=text/css>You have to
- write a username!<br><br>");
- } else {
- if($_POST[password] == "") {
- echo("<link rel=stylesheet href=../mm_spa.css type=text/css>You need to
- write a password!<br><br>");
- } else {
- include("../inc/cfg.php");
- $tjek_bruger = mysql_query("SELECT * FROM users WHERE username LIKE
- '$_POST[username]' AND password = '$_POST[password]'") or die(mysql_error
- ());
- $tjek = mysql_fetch_array($check_user);
- if($tjek[username] == "") {
- echo("ERROR!");
- } else {
- $_SESSION[username] = $_POST[Username];
- $_SESSION[password] = $_POST[Password];
- print "Hold on while the system is logging you in..<br><br>";
- print "<meta http-equiv=\"refresh\" content=\"0; url=loggedin.php\">";
- }
- }
- }
- }
- ?>
- <form action="login.php?login=yes" method="POST">
- <b>Username:</b><br>
- <input type="text" name="brugernavn" size="14"><br>
- <b>Password:</b><br>
- <input type="password" name="Password" size="14"><br>
- <input type="submit" name="submit" value="Login">
- </form>
- </body>
- </html>
- <?
- }
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment