Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'dbinfo.php';
- require_once 'functions.php';
- session_start();
- if(isset($_POST['login'])) {
- $usr=$_POST['usr'];
- $password=$_POST['password'];
- $sql= "SELECT * FROM members WHERE usr='".$usr."'AND password='".$password."' LIMIT 1";
- $res=mysql_query($sql);
- if (mysql_num_rows($res) == 1) {
- header("Location: mainpage.php");
- $_SESSION['usr'] = $usr;
- exit();
- }else {
- echo"Invalid login information";
- exit();
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement