Cannot modify header information - headers already

software development

#1

When logging in my page is throwing the following
errors… I think this has to do with
extra blank spaces being in the config.ini php
file…which I can’t seem to find:
Warning: Cannot modify header information - headers already sent by (output started at /home/.input/ddole/web.com/login.php:6) in /home/.input/ddole/web.com/login.php on line 164

How do I correct the error?

Thanks

Here is the code I copied from the website:

Agent Login Rate Plans Availability Features Frequently Asked Questions Support Sales Agents <?php require "myweb.inc"; require "authentication.inc"; if (!empty($_POST["username"])&&!empty($_POST["password"])) { $user=$_POST["username"]; $pwd=$_POST["password"]; $connection = mysql_connect($hostname,$g_username,$g_password) or die("Could not connect"); mysql_select_db($database,$connection)or die ("could not select database"); if (authenticate_user($connection,$user,$pwd)) { // session_start(); header("Location:registration.php"); } else { print " invalid username/password"; } } ?>
Username
Password

#2

You cannot call header() after you’ve already sent text to the browser.

header() can only be used before any and ALL print/echo/html data.


yerba# rm -rf /etc
yerba#


#3

and this, afaik, also includes session handling, such as session_start() in PHP