Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('/includes/include.php');
- // header('location:cases.php');
- $username = $_POST['username'];
- $password = $_POST['password'];
- $password = md5($password);
- $username = stripslashes($username);
- $password = stripslashes($password);
- $username = mysql_real_escape_string($username);
- $password = mysql_real_escape_string($password);
- $sql="SELECT * FROM login WHERE username='$username' and password='$password'";
- $result=mysql_query($sql);
- $count=mysql_num_rows($result);
- if($count==1){
- $_SESSION['username'] = $username;
- header('location:cases.php');
- }
- else {
- echo "Wrong Username or Password";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement