Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- ?>
- <?php
- include('connections.php');
- $user=$_POST['username'];
- $pass=$_POST['password'];
- if ($db_found) {
- $sql="SELECT * FROM users WHERE username='$user' and password='$pass'";
- $result=mysql_query($sql);
- $count=mysql_num_rows($result);
- if($count==1){
- header("location:index.php?user=$user");
- $_SESSION['user']=$_POST['username'];
- }
- else {
- echo "Wrong Username or Password";
- }
- mysql_close($db_handle);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement