Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include_once './storage.php';
- $htmlContent = file_get_contents('./login_form.html');
- if(count($_POST))
- {
- if(isset($_POST['username'], $_POST['password']))
- {
- $user = getUserByUserPass($_POST['username'], $_POST['password']);
- if($user !== false)
- {
- $_SESSION['user'] = $user;
- header('Location: ./login_status.php');
- exit;
- }
- else
- {
- $htmlContent .= '<br/><hr style="width: 50%; float: left;"/><br/><strong>No such user.</strong>';
- }
- }
- }
- echo $htmlContent;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement