Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("connection.php");
- ?>
- <?php
- /* Let's validate username and password */
- $username = trim($_POST['username']);
- $password = md5($_POST['password']);
- $select = "select username, password from quote where username = '$username'";
- $check = mysql_query($select);
- $checkitnow = mysql_fetch_array($check);
- $checkuser = $checkitnow['username'];
- $checkpass = $checkitnow['password'];
- if ($checkuser == $username && $checkpass == $password) {
- $_SESSION['user_id'] = $checkitnow['id'];
- header("Location: test.php");
- } else {
- echo "Authenticated Failed";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement