Below code appears this error, where the mistake ?
Warning: Cannot modify header information - headers already sent by (output started at /home/content/p/o/l/polisch123/html/dbinfo.php:18) in /home/content/p/o/l/polisch123/html/customeradmin/processlogin.php on line 37
Warning: Cannot modify header information - headers already sent by (output started at /home/content/p/o/l/polisch123/html/dbinfo.php:18) in /home/content/p/o/l/polisch123/html/customeradmin/processlogin.php on line 38
setcookie("remember", $remember, time()+60*60*24*365); //line37
setcookie("rememberp", $rememberp, time()+60*60*24*365); //line38
Code:
<?php session_start(); ?>
<?php
include("../dbinfo.php");
$linkid = mysql_connect($hostname,$username,$password);
@mysql_select_db($database) or die( "Unable to select database"); // @
$query ='';
$query = "SELECT * FROM $CustomersTable WHERE status='active' AND email='".$_POST['email-login']."' AND password='".$_POST['password-login']."';";
$result = @mysql_query($query,$linkid);
$count = @mysql_num_rows($result);
if ($count > 0) {
$row = mysql_fetch_assoc($result);
$_SESSION['title'] = $row['title'];
$_SESSION['name'] = $row['name'];
$_SESSION['license'] = $row['license'];
$_SESSION['passport'] = $row['passport'];
$_SESSION['address'] = $row['address'];
$_SESSION['city'] = $row['city'];
$_SESSION['state'] = $row['state'];
$_SESSION['postcode'] = $row['postcode'];
$_SESSION['country'] = $row['country'];
$_SESSION['mob'] = $row['mob'];
$_SESSION['fixed'] = $row['fixed'];
$_SESSION['password'] = $row['password'];
mysql_free_result($result);
mysql_close($linkid);
$_SESSION["email"] = $_POST['email-login'];
if (isset($_POST['remember'])) {
$remember = $_SESSION["email"];
$rememberp = $_SESSION["password"];
setcookie("remember", $remember, time()+60*60*24*365);
setcookie("rememberp", $rememberp, time()+60*60*24*365);
}
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>transfering.....</title></head><body><?php
Bookmarks