hackerman Posted February 28, 2007 Report Share Posted February 28, 2007 Ir fails, kas apstrādā login informāciju :) Pieņemsim, ka tas ir login.php <?php session_start(); include('config.php'); $lietotajvards = $_POST['lietotajvards']; $parole = md5($_POST['parole']); $kverijs = "select * from lietotaji where lietotajvards='$lietotajvards' and parole='$parole'"; $iznak = mysql_query($kverijs); if (mysql_num_rows($iznak) != 1) { $error = "Nesanaca"; echo "<script> alert('nepareiza parole un/vai lietotajvards!'); window.back()</script><br>"; } else { $_SESSION['lietotajvards'] = "$lietotajvards"; include "fails.php"; } ?> Kad ielogojos man rāda erroru: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at login.php:2) in login.php on line 17 wtf? Link to comment Share on other sites More sharing options...
Vebers Posted February 28, 2007 Report Share Posted February 28, 2007 Iemet google savu kļūdu, vai arī paskaties šajā pašā forumā. Sāk jau bišķ tracināt. 100 un vienu reizi ir runāts par šo! Link to comment Share on other sites More sharing options...
localhero Posted March 1, 2007 Report Share Posted March 1, 2007 Esi iekavas aizmirsis 17 linija. include "fails.php"; Link to comment Share on other sites More sharing options...
Exzo Posted March 1, 2007 Report Share Posted March 1, 2007 offtopic: Nebaidies no sql injekcijas iekš $lietotajvards? Link to comment Share on other sites More sharing options...
hackerman Posted March 1, 2007 Author Report Share Posted March 1, 2007 1) Cik zinu, iekavas nav obligātas... 2) Baidīties, neko daudz nebaidos, bet izlabot jau var :) Link to comment Share on other sites More sharing options...
andrisp Posted March 1, 2007 Report Share Posted March 1, 2007 Iekavas nav tiešām obligātas. Bet šī kļūda vēl nesen ir cilāta - pameklē forumā. Link to comment Share on other sites More sharing options...
localhero Posted March 1, 2007 Report Share Posted March 1, 2007 laikam jaa par taam iekavaam :) Bet sads errors ir tad ja ir kaut kur white space aizkeries vai echo ir pirms sesijas Link to comment Share on other sites More sharing options...
hackerman Posted March 1, 2007 Author Report Share Posted March 1, 2007 thx, localhero :) aiztaupiji manu laiku... Link to comment Share on other sites More sharing options...
Recommended Posts