Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //indsat i config.php
- $login = new Authorize('', '');
- $login->auth();
- //authorize.class.php
- <?
- class Authorize {
- private $username;
- private $password;
- public function Authorize($username, $password) {
- $this->username = $username;
- $this->password = $password;
- }
- public function auth() {
- $result = mysql_query("SELECT * FROM admin_users WHERE username='$this->username' AND password='$this->password'");
- if (!$result) {
- die('Fejl i Query'.mysql_error());
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement