Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Login {
- private $username = "";
- private $password = "";
- public function Login(){
- }
- /**
- * Lataa tarvittavat luokat automaattisesti
- *
- * @param $classname luokan nimi
- * @return void
- */
- function __autoload($classname) {
- require_once $classname . '.php';
- }
- function checkUsername() {
- $DB = new DBConn();
- $DB->select("count(userID)","users","username='$this->$username' AND password=md5('$this->$password')");
- $num = mysql_result($result, 0);
- if ($num == 0 || $num > 1) {
- echo "Virheellinen käyttäjätunnus tai salasana";
- }
- if ($num == 1) {
- echo "Login OK!";
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement