|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
login admin problem
Operating system Linux
PHP version 4.3.11 MySQL version 4.1.21-standard-log Can someone help me with this error please Debug: query = SELECT * FROM users WHERE users_username = 'augirl' AND users_password = '773b7e36725de39b8c3e626f3ef6680c' Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/morethan/public_html/demo/responder/include/db_mysql.php:115) in /home/morethan/public_html/demo/responder/do_login.php on line 34 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/morethan/public_html/demo/responder/include/db_mysql.php:115) in /home/morethan/public_html/demo/responder/do_login.php on line 34 Warning: Cannot modify header information - headers already sent by (output started at /home/morethan/public_html/demo/responder/include/db_mysql.php:115) in /home/morethan/public_html/demo/responder/include/functions.php on line 6 Thank you |
|
#2
|
|||
|
|||
|
RE: login admin problem
Something is sending headers before you start the session. Post the code before session_start()!
|
|
#3
|
|||
|
|||
|
RE: login admin problem
Hi VG
Not sure what you mean so here is the code for page can you tell me exactly what it is. <?php require("include/globals.php"); require("include/db_mysql.php"); require("include/template.php"); require("include/functions.php"); require("include/validation.php"); // verificam daca userul si parola sunt valide // vin "augirl" si "7Q3y2u5S4w" $db = new DB_Sql; // obtinem variabilele de login // $username = str_replace("'", "''", $username); AssumeIsNotEmpty($username, "augirl"); $md5password = md5($password); $query = "SELECT * FROM users WHERE users_username = '$username' AND users_password = '$md5password'"; $db->query($query); if ($db->num_rows() == 0) { // utilizator invalid // redirectare catre formularul de login redirect("index.php"); } else { // utilizator valid // incepem o sesiune si inregistram variabile de sesiune session_start(); $db->next_record(); session_register("UserID"); $UserID = $db->f("users_id"); // redirectare catre pagina principala (de lucru) redirect("controlpanel.php"); } ?> Thank you |
|
#4
|
|||
|
|||
|
RE: login admin problem
Read up on headers
http://www.decodephp.com/2007/02/25/php-the-headers-already-sent-error-a-brief-look-at-headers/ |
|
#5
|
|||
|
|||
|
RE: login admin problem
The debug output from your query is sending the headers, stop that and it will be all good
|
|
#6
|
|||
|
|||
|
RE: login admin problem
I am sorry but I am not a programmer
I know a little about changing code but it is limited so I really need someone to tell me exactly what I need to change Thank you |
|
#7
|
|||
|
|||
|
RE: login admin problem
"The debug output from your query is sending the headers, stop that and it will be all good"
Learn. google "php debug" stop the debug The price of getting is doing. |
|
#8
|
|||
|
|||
|
RE: login admin problem
|
|
#9
|
|||
|
|||
|
RE: RE: login admin problem
Quote: Hi decodephp Thank you for all your help I can login now but I would just like to know what this means Debug: query = SELECT * FROM users WHERE users_id = '1' Debug: query = select * from users where users_id='1' Thank you |
|
#10
|
|||
|
|||
|
RE: login admin problem
The function call where the db query is sent , is printing the query , this is done to see if the query going to db is correct or not .this must be a setting in the library the programmer is using for database.
|
|
#11
|
|||
|
|||
|
RE: login admin problem
Hi decodephp
Thank you for explaining this and all your help. Take Care |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Applications > login admin problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|