Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include './connect.php';
- if(($_SERVER["REQUEST_METHOD"]=="POST") && (!empty($_POST['username'])) && (!empty($_POST['password']))){
- $postedUsername = $_POST['username'];
- $postedPassword = $_POST['password'];
- $userDatabaseFind = $database->Bcard->find(array('username' => $postedUsername, 'password' => $postedPassword));
- foreach ($userDatabaseFind as $useFind){
- $storedUsername = $useFind['username'];
- $storedPassword = $useFind['password'];
- }
- if(($postedUsername == $storedUsername) && ($postedPassword == $storedPassword)){
- header('location:welcome.php');
- }
- else{
- echo 'Error';
- }
- } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement