Dj_Stay Posted January 21, 2011 Report Share Posted January 21, 2011 Lūūdzu palīdzat ar session_start(_); nekādīgi nesaprotu, kas pa problēmu tur ir :/ Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\xampp\htdocs\index.php:1) in D:\xampp\htdocs\index.php on line 7 reku php scripts <?php include("config.php"); session_start(); if(isset($_GET['darbiiba']) and $_GET['darbiiba'] == 'iziet' and isset($_SESSION['ieligojies'])) { session_destroy(); header("location: index.php"); } if(isset($_POST['username']) and isset($_POST['password'])) { $username = quote_smart($_POST['username']); $password = quote_smart(md5($_POST['password'])); $result = mysql_query("SELECT COUNT(*) FROM lietotaji WHERE user = $username AND pass = $password"); if(mysql_result($result,0,'COUNT(*)') > 0) { #ieliek sesijā datus $_SESSION['ieligojies'] = 1; $id = mysql_result(mysql_query("SELECT id FROM lietotaji WHERE user = $username AND pass = $password"),0,'id'); $_SESSION['mans_id'] = $id; } } ?> Link to comment Share on other sites More sharing options...
Dj_Stay Posted January 22, 2011 Author Report Share Posted January 22, 2011 Tak lūūūdzu kāds palīdzat Link to comment Share on other sites More sharing options...
duplets Posted January 22, 2011 Report Share Posted January 22, 2011 Pārliecinies, ka pirms session_start(); nekur netiek izvadīts html`s. Link to comment Share on other sites More sharing options...
Dj_Stay Posted January 22, 2011 Author Report Share Posted January 22, 2011 (edited) Nav, viņš virs <html> Atkal vēlviens errors Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\xampp\htdocs\index.php:1) in D:\xampp\htdocs\index.php on line 5 Edited January 22, 2011 by Dj_Stay Link to comment Share on other sites More sharing options...
poxa Posted January 22, 2011 Report Share Posted January 22, 2011 Ak Dievs, tu esi idiots. Tev teica, paskaties vai pirms session_start nav nekāds html. Link to comment Share on other sites More sharing options...
Dj_Stay Posted January 22, 2011 Author Report Share Posted January 22, 2011 es teicu, ka nav ! Link to comment Share on other sites More sharing options...
Dj_Stay Posted January 22, 2011 Author Report Share Posted January 22, 2011 ir, atrisināju problēmu, ja kādam tā ir, tad vnk vaig uzlikt UTF8 BOM Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now