Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> mysql_fetch_array(), mysql_fetch_array()
Sahee
post
Post #1





Grupa: Zarejestrowani
Postów: 34
Pomógł: 0
Dołączył: 1.09.2011

Ostrzeżenie: (0%)
-----


Siemka, robie swojego acc makera, w którym będzie się dzało logować, rejestrować, zmieniać skiny etc.
Zrobiłem już szablon i Rejestracje a teraz mam problem z logowaniem bo wyrzuca mi błąd:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/prochown/public_html/mc/logowanie.php on line 12
KOD mojego logowanie.php:

  1. <?php
  2.  
  3. if(!empty($_POST)){
  4. if(empty($_POST['login'])) $msg = "<p class='error'>Musisz podać login</p>";
  5. elseif(empty($_POST['password'])) $msg = "<p class='error'>Musisz podać hasło</p>";
  6. else {
  7. $login = tekst(strtolower($_POST['login']));
  8. $pass = md5($_POST['password']);
  9.  
  10. $dane = mysql_fetch_array(mysql_query("select * from authme where login =".$login." and haslo = ".$pass." limit 1"));
  11. if(empty($dane['user'])) $msg = "<p class='error'>Nieprawidłowe dane</p>";
  12. else {
  13. $_SESSION = array();
  14. $_SESSION['user'] = $dane['user'];
  15. header('location: konto.php');
  16. exit();
  17. }
  18.  
  19.  
  20. }
  21. }
  22.  
  23. ?>


Ten post edytował Sahee 21.11.2011, 21:05:12
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 05:02