Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php session_start(); ?>
- <h1>Login</h1>
- <?php
- include("include/config.php");
- include("include/classes/login.php");
- if(isset($_POST['login'])){
- // Username
- $username = $_POST['username'];
- $username = strip_tags($username);
- $username = mysql_real_escape_string($username);
- // Password
- $password = md5($_POST['password']);
- $password = strip_tags($password);
- $password = mysql_real_escape_string($password);
- $check_login = mysql_query("SELECT * FROM users WHERE username = '$username' and password = '$password'") or die (mysql_error());
- $count = mysql_num_rows($check_login);
- $print = mysql_fetch_array($check_login);
- $check_login = new Check_login;
- $check_login->check_info($count, $print, $username);
- }
- ?>
- <form action="" method="post">
- <table width="auto">
- <tr>
- <td width="100px">Brugernavn</td>
- <td width="auto"><input name="username" type="text" /></td>
- </tr>
- <tr>
- <td width="100px">Kodeord</td>
- <td width="auto"><input name="password" type="password" /></td>
- </tr>
- <tr>
- <td width="100px"></td>
- <td width="auto"><input name="login" type="submit" value="Login" /></td>
- </tr>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement