Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <?php include('config.php'); ?>
- <title> This will get haxed </title>
- <!-- <link rel="stylesheet" href="myCss.css" type="text/css" /> -->
- <style>
- body
- {
- background-color: black;
- color: red;
- }
- </style>
- </head>
- <body>
- <?php
- if(isset($_POST['submit']))
- {
- $name = mysql_real_escape_string($_POST['username']);
- $password = mysql_real_escape_string($_POST['password']);
- $result = mysql_num_rows(mysql_query("
- SELECT * FROM users
- WHERE username = '$name'
- AND password = '$password'
- "));
- if($result==1)
- {
- $_SESSION['username'] = $name;
- $_SESSION['password'] = $password;
- echo "You have logged in!\r\n!";
- echo "Your username: " . $_SESSION['username'];
- }
- }
- ?>
- <form method="POST" action="<?php echo $_SERVER['PHP_SELF'] ;?>" >
- <p>Username: </p>
- <input type="text" name="username" /> <br />
- <p> Password: </p>
- <input type="password" name="password" /> <br />
- <input type="submit" name="submit" value="send" /> <br />
- </form>
- <body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement