Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include ('config.php');
- $username = $_POST['username'];
- $password = $_POST['password'];
- $username = stripslashes($username);
- $password = stripslashes($password);
- $username = mysql_real_escape_string($username);
- $password = mysql_real_escape_string($password);
- $sql = "SELECT * FROM user WHERE username='$username' and password='$password'";
- $result = mysql_query($sql);
- $count = mysql_num_rows($result);
- if($count ==1) {
- $_SESSION['username'] = "$username";
- $_SESSION['inloggad'] = "1";
- header("location:members.php");
- }
- else {
- header("location:index.php");
- }
- ob_end_flush();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement