Login Script Not Working
Moderator: General Moderators
Please read the post again. I edited it.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Right.
I removed $connect from mysql_query, mysql_close and mysql_select_db.
Now the only error left is:
- Poomie
I removed $connect from mysql_query, mysql_close and mysql_select_db.
Now the only error left is:
That line is as follows:Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\apache2triad\htdocs\easybb\login\do_login.php on line 37
Code: Select all
if (mysql_num_rows($login_res) == 1)See what MySQL is telling you with mysql_error()
Code: Select all
$login_res = mysql_query($login_sql) or die(mysql_error());Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Well I think I sorted that issue.
But I have a new one.
I have a setcookie() function, but it's moaning about headers being sent out already.
But I have a new one.
I have a setcookie() function, but it's moaning about headers being sent out already.
- PoomieWarning: Cannot modify header information - headers already sent by (output started at C:\apache2triad\htdocs\easybb\login\includes\header.php:29) in C:\apache2triad\htdocs\easybb\login\do_login.php on line 60
includes/header.php is sending a header on line 29 (either beit a header() call, a white space, or a new line.. it is sending a header)
You should make a practice of calling exit; after your header() calls so the script exits.
You should make a practice of calling exit; after your header() calls so the script exits.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Not call back the headers, but postpone output. You buffer the output on the server and then you can control when the buffered data should get sent to the client.
But don't use output buffering if it's not necessary. In this case I think you could solve the problem easily by rearranging a few lines.
/josa
Code: Select all
ob_start(); // start buffering
// write data to the client - this gets stored in the buffer
ob_end_flush(); // flush the buffer and send the headers and contents to the client./josa