Warning: Cannot modify header information - headers already sent by (output started at /home/ratedate/public_html/config.php:27) in /home/ratedate/public_html/adduser.php on line 59
This is a message I recieve when a new user signs up.
Warning: Cannot modify header information - headers already sent by (output started at /home/ratedate/public_html/config.php:27) in /home/ratedate/public_html/index1.php on line 16
This is a message I recieve when a user logs in.
I have supplied code. please help I have been working on this for a while. I know html but new to php.
Index1.php
<?php
include("config.php");
$uname= $POST['username'];
$pwd= $POST['password'];
$flag= 0;
$check= "SELECT userId,username,password from kissrating_userinfo WHERE username= '" . $uname . "'";
$query_result= mysql_query($check);
if($row= mysql_fetch_array($query_result)){
if($_POST['password'] == $row[2]){
setcookie("userId", $row[0]) or die("Error ID Cookie could not be set!");
setcookie("username", $row[1]) or die("Error userName Cookie could not be set!");
header("location: home.php?opt=2");
}
else header("location: index.php?opt=1");
}
else header("location: index.php?opt=1");
?>
index1.php
config.php
<?php
$connect_string = 'localhost';
$connect_username = 'ratedate_ratedat';
$connect_password = '333';
$connect_db = 'ratedate_ivanoff';
$site_url = 'http://www.ratemydate.net';
$admin_mail = 'support@ratemydate.net';
$site_name = 'Rate My Date';
$newmem = 5;
$topmem = 5;
$contact_email = 'support@ratemydate.net';
$var1= 'Rate';
$var2= 'Pass';
$year = '2005';
$var3 = 'Rated';
$false = '0';
mysql_connect($connect_string, $connect_username, $connect_password) or die("Connection Failed");
mysql_select_db($connect_db) or die("Database selection failure");
?>
adduser.php line 59
header("location: thanks.php");
any help would be appreciated.