Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "includes/connect.php";
- $username =$_POST['username'];
- $password =$_POST['password'];
- $encrypted_password=md5($password);
- $sql="SELECT * FROM users WHERE username='$username' and password='$encrypted_password'";
- $result=mysql_query($sql);
- $count=mysql_num_rows($result);
- if($count==1){
- session_register("username");
- session_register("encrypted_password");
- header("members/index.php");
- }
- else
- {
- echo 'Wrong username and/or password';
- }
- ?>
Add Comment
Please, Sign In to add comment