Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("includes/dbconn.php");
- ?>
- <html>
- <head>
- </head>
- <?php
- function Login()
- {
- if(empty($_POST['Username']))
- {
- $this->HandleError("Username is empty!");
- return false;
- }
- if(empty($_POST['Password']))
- {
- $this->HandleError("Password is empty!");
- return false;
- }
- $username = trim($_POST['Username']);
- $password = trim($_POST['{Password']);
- if(!$this->CheckLoginInDB($Username,$Password))
- {
- return false;
- }
- session_start();
- $_SESSION[$this->GetLoginSessionVar()] = $Username;
- return true;
- }
- ?>
- <footer>
- </footer>
- </html>
Add Comment
Please, Sign In to add comment