Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> Problem z Sesjami
serwery-cs.com
post 25.09.2008, 07:04:29
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 25.09.2008

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


Witam. Napisałem skrypt logowania, i mam problem z sesjami. Na stronie wyskakuje coś takiego:

Cytat
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/erf/domains/serwery-cs.com/public_html/beta/index.php:8) in /home/erf/domains/serwery-cs.com/public_html/beta/etc/panel/serwery_panel_login.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/erf/domains/serwery-cs.com/public_html/beta/index.php:8) in /home/erf/domains/serwery-cs.com/public_html/beta/etc/panel/serwery_panel_login.php on line 2

Warning: session_register() [function.session-register]: Cannot send session cookie - headers already sent by (output started at /home/erf/domains/serwery-cs.com/public_html/beta/index.php:8) in /home/erf/domains/serwery-cs.com/public_html/beta/etc/panel/serwery_panel_login.php on line 13

Warning: session_register() [function.session-register]: Cannot send session cache limiter - headers already sent (output started at /home/erf/domains/serwery-cs.com/public_html/beta/index.php:8) in /home/erf/domains/serwery-cs.com/public_html/beta/etc/panel/serwery_panel_login.php on line 13

Warning: Cannot modify header information - headers already sent by (output started at /home/erf/domains/serwery-cs.com/public_html/beta/index.php:8) in /home/erf/domains/serwery-cs.com/public_html/beta/etc/panel/serwery_panel_login.php on line 14




Źródło pliku:

  1. <?php
  2. require_once("serwery_mysql.inc.php");
  3. $echo = '';
  4. $login = $_POST['login'];
  5. if($login) {
  6. $mail = $_POST['mail'];
  7. $pass_hash = md5($_POST['password']);
  8. $query = "SELECT * FROM serwery_clients WHERE email='$mail' AND haslo='$pass_hash'";
  9. $result = mysql_query($query);
  10. if(@mysql_num_rows($result)) {
  11. header("Locatio: index.php?panel=body");
  12. }
  13. else {
  14. $echo = 'Wpisałeś/aś niepoprawne dane!';
  15. }
  16. }
  17. ?>
  18. <?php echo $echo; ?>
  19.   <div id="right_content">
  20.            <div class="members_login">
  21.            <h1>Panel Klienta</h1>
  22.            <form action="index.php?panel=login" method="post" onsubmit="if (sprawdz(this)) return true; return false">
  23.            <div class="login_row">
  24.            <label class="login">E-mail:</label>
  25.            <input type="text" class="login_input" name="mail" />
  26.            </div>
  27.             <div class="login_row">
  28.            <label class="login">Haslo:</label>
  29.            <input type="password" class="login_input" name="password" />
  30.            </div>
  31.              <div class="login_row">
  32.              <input type="submit" class="button" name="login" value="Zaloguj" />
  33.              </div>
  34.            </form>
  35.        
  36.  
  37.            </div>



Co jest źle ? dry.gif

Ten post edytował serwery-cs.com 25.09.2008, 07:05:37
Go to the top of the page
+Quote Post
nospor
post 25.09.2008, 07:15:00
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




problem poruszany na forum wiele razy. uzyj wyszukiwarki


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post

Closed 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: 20.06.2025 - 05:20