I've been working on this for quite some time now, and finally know what the problem is. My website registers user's username and password, and asks them for it in 'login.php'. If their informaiton is correct, I tried using a 'header()' statement to redirect them to 'login_success.php'. However, I can across this quote at php.net when researching headers:
Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.
<html>
<?php
/* This will give an error. Note the output
* above, which is before the header() call */
header('Location: [url]http://www.example.com/[/url]');
?>
It then goes on to say:
Note: In PHP 4, you can use output buffering to get around this problem, with the overhead of all of your output to the browser being buffered in the server until you send it. You can do this by calling ob_start() and ob_end_flush() in your script, or setting the output_buffering configuration directive on in your php.ini or server configuration files.
I dont have access to my php.ini file, so how would I use ob_start or ob_end_flush in my code?
I have my header redirection in the heart of all my code, which is why it wasn't running. Thanks in advance!
-influx