Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] Gra internetowa - (logowanie, rejestracja)
Thymson
post 27.02.2007, 19:27:25
Post #1





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 27.12.2006

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


Witam, mam problem w logowaniu w mojej grze internetowej :
index.php
  1. <? include("head.php"); ?>
  2. <form method="post" action="login.php">
  3. <input type="text" name="email" value="Wpisz E-mail" /><br />
  4. <input type="password" name="pass" value="Wpisz Hasło" /><br />
  5. <input type="submit" value="Wejdź" />
  6. </form>

login.php
  1. <?php
  2.  
  3. if (!$email || !$pass) {
  4. include("head.php");
  5. print "Wypełnij pole z hasłem!";
  6. }
  7.  
  8. include("head.php");
  9.  
  10. $logres = mysql_num_rows(mysql_query("select * from players where email='$email' and pass='$pass'"));
  11.  
  12. if ($logres <= 0) {
  13. print "Logowanie nieudane. Sprawdź pisownie loginu oraz hasła.";
  14. } else {
  15. session_register("email");
  16. print "&nbsp;<br>Logowanie Udane ! Kliknij <a href=gra.php>tu</a> aby kontynuować...";
  17. }
  18. ?>

head.php
  1. <?php include("config.php"); session_start(); ?>

Problem - kiedy chcę się zalogować, nie ważne co wpiszę, to pokazuje mi się "Logowanie udane..." i mogę wchodzić do gry.


--------------------
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 Wersja Lo-Fi Aktualny czas: 13.06.2025 - 11:57