mam formularz , który przekazuje dane do pliku id_update.php
formularz:
<?php <form method="post" action="dzialy/id_update.php"> <label for="Name">Nr konta</label> <input type="text" name="nrkonta" id="nrkonta" /> <br> <input type="hidden" name="konto" id="konto" value="user_id" /> <input type="submit" name="submit" value="Wyślij" class="submit-button" /> </form> ?>
dane te ida do zewnetrznego pliku: id_update.php
<?php //Start session ..//laczenie z baza //Function to sanitize values received from the form. Prevents SQL injection function clean($str) { } } //Sanitize the POST values $nrkonta = clean($_POST['nrkonta']); $konto = clean($_POST['konto']); //Input Validations if($nrkonta == '') { $errmsg_arr[] = 'Podaj nr konta gracza'; $errflag = true; } //If there are input validations, redirect back to the login form if($errflag) { $_SESSION['ERRMSG_ARR_NRKONTA'] = $errmsg_arr; } //Create query // mysql_query("set names utf8"); // $query="UPDATE users SET $konto='".$nrkonta."' WHERE uzytkownik_nr='".$_SESSION['SESS_MEMBER_ID']."'"; // mysql_query($query); // echo mysql_error(); $_SESSION['ERRMSG_ARR_NRKONTA'] = 'Dziekujemy za dodanie nr konta gracza!'; ?>
Dlaczego więc dostaje info:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /tktbetpl/domains/tktbetpl.twojhost.pl/public_html/dzialy/id_update.php:1) in /tktbetpl/domains/tktbetpl.twojhost.pl/public_html/dzialy/id_update.php on line 3
Warning: Cannot modify header information - headers already sent by (output started at /tktbetpl/domains/tktbetpl.twojhost.pl/public_html/dzialy/id_update.php:1) in /tktbetpl/domains/tktbetpl.twojhost.pl/public_html/dzialy/id_update.php on line 63
linia 63 to tutaj 44
prosze o pomoc!
przypominam, że do tej pory wszystko bylo ok , tylko zedytowalem coś w kodzie i od tego momentu nie działa tak jak powinno
pozdraiwma