Napisałem klasę logującą i mam taki problem, ze nie loguje, pomimo, ze przesyłam różne dane to nic nie otrzymuję.
Gdy dla sprawdzenia przyczyny wyświetliłem co zwraca zapytanie to zobaczyłem, ze za każdym razem otrzymuję resultResource id #15.
Co jest przyczyną? dane przesyłane są poprawne bo sprawdziłem, tylko zapytanie nie działa jak należy, bo powinno być zalezne od zawartości bazy a jak dam niepoprawne dane to tez mam to samo.
<?php class User { public $status; public $access; public function LogIn () { { { { $login = $_POST['login']; MysqlStart (); MysqlEnd(); if (!$result) {return "Nie ma takiego użytkownika!"; } else { { $_SESSION['UserName'] = $user['imie']; $_SESSION['UserLastname'] = $user['nazwisko']; $_SESSION['UserAvatar'] = $user['avatar']; $_SESSION['UserGG'] = $user['gg']; $_SESSION['UserRights'] = $user['prawa']; $_SESSION['UserStatus'] = $user['status']; $_SESSION['UserClass'] = $user['klasa']; $_SESSION['UserFooter'] = $user['stopka']; $_SESSION['UserBanned'] = $user['banned']; $_SESSION['UserType'] = $user['typ']; $_SESSION['UserLogIn'] = TRUE; return 1; } } } else {return 'Pola moga składać się tylko z cyfr, liter oraz spacji!';} } else {return 'Maksymalna dozwolona ilość znaków to 50!';} } else { return 'Uzupełnij wszystkie pola!';} } public function LogInPanel ($dane) { $user= new User; if ($_POST['loguj'] === 1 && $user->LogIn () === 1) {} elseif ($_POST['loguj'] === 1 && $user->LogIn () !== 1) {$err == $user->LogIn ();} //if ($_SESSION['UserLogIn'] === FALSE) if (1===1) {$x = '<form action="" method="post"> '.$dane['pola'].' <input type="hidden" name="loguj" value="1"/> </form>'; {$x .=$dane['err1'].$user->LogIn ().$dane['err1'];} } return $x.$x1; } public function UserStatus () { if ($_SESSION['UserBanned'] === 1) { return 1; $_SESSION['UserStatus'] == 0; } else { return $_SESSION['UserStatus']; } } public function Access ($name) { if ($_SESSION['LogIn'] === 1) $access = $access[$name]; } elseif($_SESSION['UserStatus'] === 5) {$access = 1; } else { $access = 0; } return $access; } }