Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--logout_parse.php-->
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <?php
- include_once ("connect.php");
- if(isset($_POST['username'])) {
- $username = $_POST['username'];
- $password = $_POST['password'];
- $sql = "SELECT * FROM Login WHERE username='".$username."' AND password='".$password."'";
- $res = mysql_query($sql) or die (mysql_error());
- $count= mysql_num_rows($res);
- if($count == 1) {
- $_SESSION["username"] = $username;
- echo "<script>window.location = 'admin.php';</script>";
- } else {
- echo "Fel username eller password. <a href=login.php>Försök igen</a>";
- }
- }
- ?>
Add Comment
Please, Sign In to add comment