Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enter code here
- require_once('db.php');
- $sql = 'SELECT * FROM users_table
- WHERE username="'.mysql_escape_string($uname).'" AND password="'.mysql_escape_string(md5($pw)).'"
- LIMIT 0, 1
- ';
- $qry = mysql_query($sql);
- $count = mysql_num_rows($qry);
- if($count > 0) {
- $_SESSION['username'] = $uname;
- $_SESSION['password'] = $pw;
- header('Location: products_list.php');
- } else {
- header('Location: index.php?error=1');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement