Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isLoggedIn()
- {
- session_start();
- $this->user = $_SESSION['username'];
- $this->pass = $_SESSION['password'];
- $this->mysql->query("SELECT * FROM users WHERE username = '"
- .$this->user."' AND password = '".$this->pass."'");
- $result = $this->mysql->lastQuery();
- if(mysql_num_rows($result) == 0)
- {
- header("Location: ../expired.php");
- die();
- }
- $result_array = mysql_fetch_array($result);
- $this->id = $result_array['id'];
- $this->user = $result_array['username'];
- $this->password = $result_array['password'];
- $this->email = $result_array['email'];
- return 1;
- }
Add Comment
Please, Sign In to add comment