When a user tries to register on the site this error shows up:
Warning: Cannot modify header information - headers already sent by (output started at /home/ratedate/public_html/burgundyblue/config.php:24) in /home/ratedate/public_html/burgundyblue/adduser.php on line 8
I have included Config.php code and adduser.php code any help would be appreciated.
config.php:
<?php
$connect_string = 'localhost';
$connect_username = '******_ratedat';
$connect_password = '***';
$connect_db = 'ratedate_*******';
$site_url = 'http://www.ratemydate.net';
$admin_mail = 'support@ratemydate.net';
$site_name = 'DateRate';
$newmem = 5;
$topmem = 5;
$contact_email = 'support@ratemydate.net';
$var1= 'Rate';
$var2= 'Pass';
$year = '2004';
$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");
?>
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");
?>
Need Webhosting?
www.mybudgethost.com